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
Automate HubSpot deal line items with n8n and Slack

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

Learn how to Build this Workflow with AI:

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


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.

Automate HubSpot deal line items with n8n and Slack

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.