Opening Problem Statement
Meet Sarah, a busy marketing manager at a growing SaaS company. Every time a new contact is created in HubSpot, she spends at least 20 minutes manually searching for additional information like job titles, company size, and social profiles to make her contact database useful for personalized campaigns. Multiply that by 50 new contacts a week, and Sarah loses more than 16 hours a month just on data entry — a drain on resources that could be better spent on strategy.
Sarah also struggles with incomplete or outdated contact information, which causes ineffective marketing and missed sales opportunities. What if there was a way to automatically enrich these new contacts with accurate and detailed information as soon as they enter HubSpot?
What This Automation Does
This n8n workflow solves Sarah’s problem by enriching new HubSpot contacts with valuable data fetched from ExactBuyer, an external contact enrichment API. Here’s what happens when this workflow runs:
- Detects new contact creation in HubSpot using the HubSpot Trigger node.
- Fetches complete contact details from HubSpot to get the basic email and contact ID.
- Extracts email and VID (user ID) from HubSpot response for further querying.
- Calls the ExactBuyer API using the email as an identifier to enrich contact information (phone, social profiles, location, job title, company name, etc.).
- Updates HubSpot contact with the enriched data to keep the CRM up-to-date and actionable.
- Handles errors gracefully, for example, if ExactBuyer doesn’t return data, it continues without crashing.
Sarah saves more than 10 hours a week on manual contact updates and has richer data to run smarter campaigns.
Prerequisites ⚙️
- HubSpot account with appropriate API scopes and OAuth2 credentials configured in n8n (for trigger and contact update nodes).
- ExactBuyer API key for enrichment calls.
- n8n workflow automation platform account to build and run this workflow.
- Optional: If you want to self-host n8n for better control and security, check out hosting providers like Hostinger.
Step-by-Step Guide to Build This Workflow ✏️
- Start with HubSpot Trigger node for contact creation
Navigate to n8n editor, click + Add Node, select HubSpot Trigger, and configure it to listen to contact creation events. Use OAuth2 credentials linked to your HubSpot Developer account.
You should see the webhook URL generated. This URL listens for when new contacts are made.
Common mistake: Forgetting to assign the correct API scopes for reading contact events. - Add HubSpot Get Contact node
Select HubSpot node, set operation to get, and in Contact ID, use expression{{$json.contactId}}from the trigger node.
This fetches all basic contact details you need.
Common mistake: Using incorrect or missing Contact ID fields will cause errors here. - Set keys with User ID and email
Add a Set node; assignuser_idto VID from HubSpot JSON, andemailfrom the contact properties email field.
This prepares the data for the next node.
Common mistake: Not using exact JSON path like$json.properties.email.valuecan cause undefined values. - Add If node to check for email existence
Use an If node with condition set to check that email is not empty.
This ensures API calls only happen with valid emails.
Common mistake: Improper condition logic or case sensitivity issues in the If node. - Call ExactBuyer API to enrich contact
Add an HTTP Request node, configure method GET with URLhttps://api.exactbuyer.com/v1/enrich, set query parameters with email from previous Set node, and required fields like work_email.
Use HTTP Header Auth with your ExactBuyer API key.
Common mistake: Incorrect API key or forgetting to set authentication headers leads to 401 errors. - Update HubSpot contact with enriched data
Add another HubSpot node, operation update, provide the email and map fields returned from ExactBuyer such as first name, last name, job title, phone number, company size, etc.
This automatically updates the contact record.
Common mistake: Mapping wrong JSON properties or missing fields results in incomplete updates. - Add NoOp node for error handling
Connect ExactBuyer node’s error output to a NoOp node so failures in enrichment don’t stop the workflow.
Common mistake: Not configuring error flow to continue gracefully. - Test the workflow by creating a new contact in HubSpot
Create a dummy contact in your HubSpot portal and watch the workflow trigger and enrich the contact.
You should see the contact data update quickly with detailed info.
Common mistake: Not activating webhook or misconfigured credentials.
Customizations ✏️
- Change enrichment fields: In the HTTP Request node, modify the query parameter
requiredto include more or fewer fields, such as adding social media URLs or removing personal emails. - Add company details: Extend the Update contact HubSpot node by mapping additional ExactBuyer company profile data if available.
- Configure error notifications: Instead of NoOp, connect the error output to an email node (like Gmail) to alert when enrichment fails.
- Use different contact property: If your HubSpot contact uses a custom email field, adjust the Set node and expressions accordingly.
Troubleshooting 🔧
- Problem: “401 Unauthorized” from ExactBuyer API
Cause: Invalid or missing API key in HTTP Request headers.
Solution: Double-check the ExactBuyer API key credentials in n8n under HTTP Header Auth settings. - Problem: HubSpot trigger not firing
Cause: Incorrect webhook URL or missing subscription to contact creation events.
Solution: Ensure your HubSpot webhook URL is correctly copied and that event subscriptions are active in HubSpot Developer portal. - Problem: Contact update missing fields
Cause: Incorrect JSON path mappings from ExactBuyer response.
Solution: Use the n8n debug panel to inspect output JSON, then adjust field mapping carefully in the HubSpot update node.
Pre-Production Checklist ✅
- Verify HubSpot OAuth2 credentials are active and cover correct scopes (contact read/write).
- Test ExactBuyer API key separately using a REST client to confirm access.
- Test the HubSpot trigger manually by creating a contact and verifying webhook fires.
- Run workflow in n8n debug mode to ensure data flows correctly through nodes.
- Backup your workflow JSON before final deployment.
Deployment Guide
Once tested, activate the workflow in n8n by turning the toggle switch ON in the editor. Ensure your workflow runs continuously to catch all new contacts as they are created in HubSpot.
Monitor runs periodically using n8n’s execution logs to check for failures or errors. You can enable notifications for failures by adding email nodes or integrations like Slack.
FAQs
- Can I use alternatives to ExactBuyer?
Yes, but you will need to adjust the HTTP Request node and field mappings to match the API structure of the alternative provider. - Does this consume API credits?
Yes, each enrichment call to ExactBuyer counts against your API quota. - Is the data secure?
Data flows through secure OAuth2 and HTTPS connections. Follow best practices for API key storage and limit permissions. - Can this workflow handle bulk imports?
This workflow triggers on individual contact creation. For bulk imports, consider batch enrichment strategies or adapting the workflow for list processing.
Conclusion
By building this exact n8n workflow, you’ve automated the enrichment of your HubSpot contacts with detailed, actionable data from ExactBuyer. Sarah’s tedious manual updates are gone, replaced by richer profiles that drive smarter marketing and sales decisions.
This automation saves you hours every week, improves data quality, and helps your team focus on higher-value activities.
Next, consider automating lead scoring based on enriched data, integrating other CRM platforms, or setting up notifications for VIP contacts.
Happy automating!