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
- The workflow extracts the two deal IDs from webhook data.
- Fetches line items linked to the won deal using HubSpot API.
- Extracts product SKUs from those line items.
- Fetches product details like product IDs, billing frequency, and prices based on SKUs.
- Creates new line items in the new deal with correct product IDs and quantities.
- 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
- Download the workflow file using the download button on this page.
- Open your n8n editor.
- Use the Import from File option to upload the workflow.
2. Configure Credentials
- Add required API keys or credentials for HubSpot and Slack.
- Check if any IDs like Slack channel ID, HubSpot app token, or deal IDs need updating.
3. Test Workflow
- Trigger the workflow manually or from HubSpot with test deal IDs.
- Verify the line items are copied correctly and the Slack notification is sent.
4. Activate Workflow
- Enable the Webhook node to make the workflow live.
- 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.
