Automate HubSpot Deal Line Items with n8n Workflow

This n8n workflow automates copying line items from a won HubSpot deal to a newly created deal, saving hours of manual work and eliminating human errors. It seamlessly integrates HubSpot APIs with Slack notifications to keep your team informed of successful replications.
set
httpRequest
slack
+2
Workflow Identifier: 1842
NODES in Use: Set, HTTP Request, Slack, Webhook, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow copies product line items from a won deal in HubSpot to a new deal automatically.
It stops the user from copying details by hand and avoids mistakes with SKUs or quantities.
The result is correct new deals with the right products linked fast.
This saves hours of work and prevents billing errors.


Who Should Use This Workflow

This workflow is useful for users who manage deal data and want to reduce manual copy steps.
It fits businesses using HubSpot for sales and tracking products on deals.
Users who want clear, automated line item transfer when a deal closes win from this workflow.


Tools and Services Used

  • HubSpot API: To get and create deals and line items.
  • n8n platform: Runs the workflow automation.
  • Slack API: Sends messages to notify users.

Inputs, Processing Steps, and Output

Inputs

  • Webhook triggered by HubSpot when a deal stage changes to won.
  • Query parameters with two deal IDs: the won deal and the new deal created.

Processing Steps

  1. The workflow extracts the two deal IDs from webhook data.
  2. Fetches line items linked to the won deal using HubSpot API.
  3. Extracts product SKUs from those line items.
  4. Fetches product details like product IDs, billing frequency, and prices based on SKUs.
  5. Creates new line items in the new deal with correct product IDs and quantities.
  6. Sends a Slack notification to confirm successful replication.

Output

  • New deal has copied line items matching the original deal accurately.
  • Slack alert shows operation success with links.

Beginner Step-by-Step: How to Use This Workflow in Production Inside n8n

1. Import Workflow

  1. Download the workflow file using the download button on this page.
  2. Open your n8n editor.
  3. Use the Import from File option to upload the workflow.

2. Configure Credentials

  1. Add required API keys or credentials for HubSpot and Slack.
  2. Check if any IDs like Slack channel ID, HubSpot app token, or deal IDs need updating.

3. Test Workflow

  1. Trigger the workflow manually or from HubSpot with test deal IDs.
  2. Verify the line items are copied correctly and the Slack notification is sent.

4. Activate Workflow

  1. Enable the Webhook node to make the workflow live.
  2. Ensure the workflow status is set to active.

If needed, check this self-host n8n resource for running n8n on your own server.


Common Inputs and Outputs in the Workflow

Inputs

  • deal_id_won: ID string from the won deal.
  • deal_id_created: ID string from the new created deal.

Outputs

  • Line items created on new deal with product details.
  • Slack message with confirmation.

Customization Ideas

  • Change Slack channel to your preferred notification destination.
  • Adjust quantities for line items in the create line item node.
  • Add more product properties like discounts or notes when fetching product details.
  • Modify HubSpot workflow triggers to respond on different deal events.

Troubleshooting

  • 401 Unauthorized error fetching line items: Check HubSpot App Token in n8n credentials. Refresh if expired.
  • No Slack notifications: Ensure correct Slack channel ID and bot permissions with chat:write scope.
  • Missing line items on new deal: Verify correct deal ID extraction and API calls returned valid data.

Pre-Production Checklist

  • Test webhook trigger by sending real deal IDs from HubSpot.
  • Validate HubSpot API keys and Slack credentials.
  • Check if line items fetch returns expected data.
  • Confirm new line items appear properly on new deal.
  • Verify Slack messages arrive.
  • Backup HubSpot data before turning on in production.

Deployment Guide

After testing, make sure to activate the workflow by enabling the Webhook node.
Keep the HubSpot workflow trigger active as the event source.
Use n8n’s error monitoring or alerts to watch for problems.


Summary

✓ Saves hours weekly by copying line items automatically.
✓ Prevents human errors in product data.
✓ Keeps HubSpot deals consistent and accurate.
✓ Sends Slack notifications for operation success.
✓ Simple to start with workflow import and config.

Frequently Asked Questions

Use a HubSpot Private App token or OAuth2 credentials in n8n. Add these in the HubSpot API credential settings.
Check if deal IDs are correctly extracted. Verify HubSpot API calls returned valid line item data.
Update the channel ID in the Slack node configuration within n8n to the desired Slack channel.
Yes, but for very high volume, consider splitting workflows or using queues to avoid API rate limits.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free