TutorialPractitioner7 min read

CRM workflows in n8n: HubSpot for marketers

Automate CRM work in n8n with HubSpot: upsert contacts, match companies by domain, protect first-touch data and alert owners in Slack.

Dipuck Jones
Written by Founder of MentionX · 13+ years in B2B SaaS growth and SEO
Reviewed
Short answer

n8n is useful around the CRM, not instead of it. Use it to get clean data in, connect the CRM to tools it doesn't talk to, and alert people at the right moment, while keeping the CRM as the system of record.

Key takeaways
  • Upsert by email so re-runs never create duplicates.
  • Protect first-touch fields; let automations fill them only when empty.
  • Use the CRM's own automation for in-CRM logic and n8n for cross-tool steps.
  • Test in a sandbox portal, never with real customer records.

Checked 4 November 2026 (CET) against n8n documentation and the n8n pricing page. n8n ships updates often and node options, plan limits and prices change, so confirm in your own instance and on the pricing page. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.

01Where does n8n fit next to the CRM's own automation?

HubSpot, Salesforce and Pipedrive all have built-in automation. Use it for things that live entirely inside the CRM, such as setting a property when a deal stage changes. Use n8n when the job crosses tools:

  • A form on your site that isn't a native CRM form.
  • Enrichment from an external API before the record is created.
  • Alerts in Slack with context from three systems.
  • Writing CRM data into a reporting sheet or warehouse.
  • AI classification of free-text fields such as "What are you looking for?".

Running both is normal. Document which tool owns which rule, so two automations don't fight over the same field.

02The upsert pattern

The safest pattern for any lead workflow is upsert: create the contact if new, update if it exists, keyed on email. In the HubSpot node this is Contact > Create/Update. Upserts make workflows idempotent: running the same input twice leaves the CRM in the same state as running it once. That matters, because retries and replays happen.

03Protecting data that matters

Automations can quietly destroy attribution. If every form fill overwrites "original source", your first-touch reporting fills up with "newsletter". Rules that help:

  • Only write original-source fields when they're empty.
  • Write latest-touch data to separate fields.
  • Never let an AI step write directly to a field sales relies on without a review step or a clear confidence rule.
  • Log what each workflow changed in a sheet or data table for the first few weeks.

04Alerts that sales will read

Sales teams ignore noisy alerts. Send an alert only when a rep needs to act, and include the reason. "Enterprise demo request from a target account, owner: you" is useful. "New contact created" is not.

Our view: the most valuable CRM automation for most B2B marketing teams is fast, accurate routing of high-intent leads. Build that before anything clever.

05HubSpot node operations marketers use

According to the n8n HubSpot node docs, the node covers contacts, contact lists, companies, deals, engagements, forms and tickets. The operations that matter most for marketing:

ResourceOperationsTypical use
ContactCreate/Update, Get, Get all, Get recently created/updated, Search, DeleteUpsert leads, look up owners
Contact ListAdd contact to a list, Remove from a listNurture enrolment
CompanyCreate, Update, Get, Search by domainMatch leads to accounts
DealCreate, Update, Get, SearchHand-offs from marketing to sales
EngagementCreate, Get, DeleteLog a note or task for a rep

The HubSpot node can also be used as an AI tool attached to an AI Agent, which lesson 9 covers. If you need an operation the node lacks, the docs point to the HTTP Request node with the same HubSpot credential, using Predefined Credential Type.

06Other CRMs

n8n has nodes for Salesforce, Pipedrive and many others. The patterns in this lesson (upsert by email, look up the company by domain, write a status back, alert the owner) carry across. Check each node's docs for its exact operations; they differ.

07Fields to standardise before you automate

  • Lifecycle stage or lead status values, written down and agreed with sales.
  • Lead source and original UTM values, so automations don't overwrite first-touch data. The UTM tagging lesson in the GA4 track sets the conventions.
  • Owner assignment rules, by territory, segment or round robin.
  • A "last automated by" property, so anyone looking at a record can see which workflow touched it.

08HubSpot workflow ideas by team

TeamWorkflowTrigger
Demand genAdd webinar attendees to a list and create a follow-up taskForm or webhook
Sales opsAlert the owner in Slack when a target account submits a formHubSpot trigger
Marketing opsFix country and job title formatting nightlySchedule
ContentLog which content a lead read before convertingWebhook from your site
LeadershipWeekly new deals by source to SlackSchedule

09Avoiding CRM damage

CRM data is shared by sales, marketing and service. Before a workflow writes to it:

  • Agree with the CRM owner which properties the workflow may change.
  • Never overwrite a field a person set manually without a rule for which wins.
  • Use create-or-update operations matched on email, not blind creates.
  • Test on a handful of records, then a small batch, then everything.
  • Log every change (record ID, field, old value, new value) to a sheet or data table.

If the HubSpot node lacks an operation you need, use the HTTP Request node with the predefined HubSpot credential to call the API directly.

10Worked example: Ledgerline's demo request routing

Ledgerline is a fictional accounts-payable software company. Details are illustrative.

Ledgerline's website demo form wasn't a HubSpot form, and leads were copied in by hand each morning. The team replaced that with the webhook workflow above.

The first version overwrote "original source" on returning contacts. They caught it in testing because one test lead was an existing contact first acquired through a webinar. They changed the workflow to search first and only set original source when empty.

Routing followed a rule agreed with sales: companies over 500 employees went to the enterprise rep, others to a round robin. The Slack alert named the owner, the company and the page the form was submitted from.

Walkthrough

  1. Create a HubSpot credential in n8n (OAuth2 or a private app token, per the n8n HubSpot credentials docs). Use a sandbox or test portal if you have one.
  2. Trigger: Webhook, receiving JSON from your website form (email, name, company, utm_source, utm_campaign).
  3. Edit Fields to normalise email and add email_domain.
  4. HubSpot Contact > Create/Update with email as the key, setting name, company and lead source fields. Only set original source fields if empty (use a Search first, or a HubSpot workflow, to protect first-touch data).
  5. HubSpot Company > Search by domain. Use an IF node: if found, associate; if not, leave for sales ops.
  6. Slack message to the owner or the inbound channel with a link to the contact.
  7. Respond to the webhook so the form gets a fast success response.
  8. Test with three fake leads: new person, existing person, existing company.

11Try it yourself

Map your current lead hand-off on paper: every field, who sets it and when. Then build the upsert workflow above in a sandbox portal. Run it twice with the same lead and confirm only one contact exists and no first-touch field changed.

12Quick quiz

1. Which HubSpot contact operation makes re-runs safe?

Answer: Create/Update (upsert) keyed on email.

2. What do you do when the HubSpot node lacks an operation?

Answer: Use the HTTP Request node with the HubSpot predefined credential.

3. Why add a "last automated by" property?

Answer: So people can see which workflow changed a record and trace problems.

13What should you check before the next lesson?

  • Contacts are upserted by email.
  • First-touch fields are protected.
  • Alerts go only to people who need to act.

Next: A lead enrichment and routing workflow. Or return to the n8n for Marketers track.

14Common questions

Can n8n replace HubSpot workflows? Not entirely. Use HubSpot workflows for in-CRM logic and n8n for cross-tool work.

Does n8n work with Salesforce? Yes, it has a Salesforce node. The patterns here apply; operations differ.

Should I test in production? No. Use a sandbox or test portal, or clearly labelled test records you delete afterwards.

Questions people ask

3 answers

Can n8n replace HubSpot workflows?

Not entirely. Use HubSpot workflows for in-CRM logic and n8n for cross-tool work.

Does n8n work with Salesforce?

Yes, it has a Salesforce node. The patterns here apply; operations differ.

Should I test in production?

No. Use a sandbox or test portal, or clearly labelled test records you delete afterwards.

Sources

  1. n8n Docs, HubSpot nodedocs.n8n.io
  2. n8n Docs, Webhook nodedocs.n8n.io
  3. n8n Docs, HTTP Request nodedocs.n8n.io
  4. n8n Docs, HubSpot credentialsdocs.n8n.io
  5. All accessed 4 Nov 2026.
Written and reviewed by Dipuck JonesHow we research and testReport an error

Keep learning

All n8n →