DEV Community

Pirate Prentice
Pirate Prentice

Posted on

n8n HubSpot Node: Sync Contacts, Deals, and Companies in Your Workflows (Free Workflow JSON)

n8n HubSpot Node: Sync Contacts, Deals, and Companies in Your Workflows (Free Workflow JSON)

If you're managing a CRM in HubSpot and wish your automation workflows could reach in and pull, push, or update records without manual exports — the n8n HubSpot node is your answer.

This guide covers every operation you'll actually use, six gotchas that bite people, three real-world workflow patterns, and a free downloadable JSON so you can start in minutes.


What the HubSpot Node Does

The HubSpot node connects n8n to the HubSpot CRM API. You can:

  • Read, create, update, and delete contacts, companies, deals, and tickets
  • Search any CRM object with filters
  • Manage associations between objects (e.g., link a contact to a deal)
  • Upsert records — create if not found, update if found

Authentication is via a HubSpot Private App token (OAuth2 is also supported for multi-account setups).


Operations Reference

Contact Operations

Operation What it does
Create Add a new contact
Get Fetch by ID
Get Many List contacts with optional filters
Update Update any property
Delete Archive contact
Search Filter by email, name, property value
Upsert Create or update by email

Company Operations

  • Create, Get, Get Many, Update, Delete, Search

Deal Operations

  • Create, Get, Get Many, Update, Delete, Search
  • Set deal stage, associate with contacts/companies

Ticket Operations

  • Create, Get, Get Many, Update, Delete, Search

Association Operations

  • Create Association (link contact ↔ deal, company ↔ deal, etc.)
  • Get Associations
  • Delete Association

Authentication: Private App Token

  1. In HubSpot → Settings → Integrations → Private Apps
  2. Create a new app, select the scopes you need (contacts read/write, deals read/write, etc.)
  3. Copy the token → paste into n8n as a HubSpot credential (Bearer Token type)

Scope tip: Request only the scopes your workflow needs. Least-privilege reduces blast radius if the token leaks.


Six Gotchas

1. Property names are internal names, not labels.
HubSpot displays "First Name" in the UI but the API property name is firstname. Use HubSpot's property settings page to look up internal names before building your workflow.

2. Search returns max 100 results per page.
The Search operation supports pagination via after cursor. For large lists, loop with a Code node until paging.next.after is null.

3. Upsert deduplicates by email only.
The built-in Upsert uses email as the unique key. If you need to deduplicate by phone or custom ID, use Search → IF → Create/Update manually.

4. Associations require separate requests.
Creating a deal doesn't automatically associate it with a contact. You must use the Association operation as a follow-up step — plan for two nodes per new deal creation.

5. Rate limits are per-second AND per-day.
HubSpot's API enforces 100 requests/10 seconds for Private Apps and 250K daily. For bulk syncs, add a Wait node (1s) between batches to avoid 429 errors.

6. Deleted records are archived, not permanently gone.
HubSpot's "Delete" archives records. They can be restored. If you're building a GDPR deletion flow, verify the record is permanently deleted via HubSpot's UI or a separate API call — n8n's Delete maps to the archive endpoint.


Workflow Pattern 1: Typeform Lead → HubSpot Contact + Deal

Trigger: Typeform Webhook (new form submission)
Steps:

  1. Typeform Trigger node → extract name, email, company, budget
  2. HubSpot node → Upsert Contact (email dedup)
  3. HubSpot node → Create Deal (associate with contact ID from step 2)
  4. HubSpot node → Create Association (contact ↔ deal)
  5. Gmail/Resend → send confirmation email to lead

Why it matters: Every inbound lead lands in HubSpot automatically, with a deal created and associated in the same workflow — no manual CRM entry.


Workflow Pattern 2: HubSpot Deal Stage Change → Slack Alert + Google Sheet Log

Trigger: Schedule Trigger (every 15 min) or HubSpot webhook (requires HubSpot subscription webhook setup)
Steps:

  1. HubSpot node → Search Deals where dealstage changed in last 15 minutes (use lastmodifieddate filter)
  2. IF node → filter for deals moving to "Closed Won"
  3. Slack node → post to #sales channel ("🎉 Deal closed: {deal name} — ${amount}")
  4. Google Sheets node → append row to revenue tracker

Why it matters: Sales team gets instant Slack notifications on closed deals without HubSpot notifications being buried in email.


Workflow Pattern 3: Stripe Payment → HubSpot Contact Update + Note

Trigger: Stripe Webhook (charge.succeeded)
Steps:

  1. Stripe Webhook Trigger → extract customer email, amount, invoice ID
  2. HubSpot node → Search Contact by email
  3. HubSpot node → Update Contact (set custom property last_payment_amount, last_payment_date)
  4. HubSpot node → Create Engagement (Note) on contact: "Stripe payment received: ${amount} on {date}, invoice {id}"
  5. IF node → if amount > $500, set contact property high_value_customer = true

Why it matters: Your CRM stays in sync with real payment data — support reps can see payment history directly in HubSpot without switching to Stripe.


Free Workflow JSON

Download the pre-built workflow for Pattern 1 (Typeform → HubSpot Contact + Deal):

👉 Get the free n8n HubSpot workflow JSON

Import it: n8n → top-right menu → Import from URL or paste JSON → connect your HubSpot credentials → activate.


HubSpot Node vs. HTTP Request Node

HubSpot Node HTTP Request to HubSpot API
Auth setup Credential picker Manual Bearer header
Available ops Standard CRM ops Full API including v3 custom objects
Pagination Manual Manual
Best for Standard contact/deal/company workflows Custom objects, bulk imports, advanced filters

Use the HubSpot node for 90% of cases. Use HTTP Request when you need HubSpot's v3 custom objects API or undocumented endpoints.


Key Takeaways

  • HubSpot node covers contacts, companies, deals, tickets, and associations
  • Authenticate with a Private App token scoped to exactly what you need
  • Property names are internal names — check HubSpot's property settings before building
  • Upsert by email is the cleanest dedup for inbound leads
  • Always create associations as a separate step after creating related objects
  • Rate limit: 100 req/10s — add Wait nodes in bulk workflows

What to Read Next


Need this HubSpot sync built for you? The Done-For-You n8n Workflow Build service ($99 one-time) delivers a custom, tested workflow to your inbox within 48 hours.

Top comments (0)