DEV Community

Pirate Prentice
Pirate Prentice

Posted on

n8n + HubSpot Integration: Automate Lead Qualification and Follow-ups

n8n + HubSpot Integration: Automate Lead Qualification and Follow-ups

Most SMBs waste time on manual lead qualification. They capture 20–50 leads/day, but 80% never get contacted because the follow-up process is broken.

With n8n + HubSpot, you automate:

  • Lead scoring — auto-assign quality scores based on behavior (email opens, page visits, form submissions)
  • Auto-routing — send hot leads to sales immediately; nurture cold ones in email sequences
  • Slack alerts — notify your team of qualified leads in real-time

What you'll learn

  1. HubSpot node setup — authentication, contact operations, deal creation
  2. Lead qualification workflow — criteria-based scoring and routing
  3. Follow-up automation — lifecycle email sequences and Slack notifications
  4. Common gotchas — rate limits, property sync timing, contact deduplication

HubSpot Node: Core Operations

1. Create/Update Contact

Operation: Create or Update Contact
Fields: email (required), first_name, last_name, phone, custom properties
Enter fullscreen mode Exit fullscreen mode

Gotcha: HubSpot dedupes on email. If email exists, the node updates the contact instead of creating. Useful for sync workflows; set your expectations accordingly.

2. Get/Search Contacts

Operation: Search Contact
Filters: by email, by property value (lifecycle_stage, hs_lead_status)
Enter fullscreen mode Exit fullscreen mode

Useful for:

  • Finding existing contacts before creating deals
  • Checking lead score or lifecycle stage
  • Pulling contact history for enrichment

3. Create Deal

Operation: Create Deal
Associate with contact (associatedContacts[] field)
Set deal stage, deal value, expected close date
Enter fullscreen mode Exit fullscreen mode

Workflow: Auto-Qualification + Slack Alert

{
  "nodes": [
    {
      "name": "HubSpot Trigger: New Form Submission",
      "type": "n8n-nodes-base.webhook",
      "config": {
        "path": "hubspot-form-submission",
        "method": "POST"
      }
    },
    {
      "name": "Extract Contact Info",
      "type": "n8n-nodes-base.set",
      "config": {
        "email": "{{ $json.data.email }}",
        "first_name": "{{ $json.data.firstname }}",
        "lead_source": "{{ $json.data.lead_source }}",
        "company_size": "{{ $json.data.company_size }}"
      }
    },
    {
      "name": "Create/Update Contact in HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "config": {
        "operation": "create_or_update_contact",
        "email": "{{ $json.email }}",
        "properties": [
          {
            "name": "firstname",
            "value": "{{ $json.first_name }}"
          },
          {
            "name": "hs_lead_status",
            "value": "Open"
          },
          {
            "name": "lifecyclestage",
            "value": "lead"
          }
        ]
      }
    },
    {
      "name": "Score Lead: Hot if company size > 50",
      "type": "n8n-nodes-base.if",
      "config": {
        "conditions": {
          "condition": "gt",
          "value1": "{{ $json.company_size }}",
          "value2": "50"
        }
      }
    },
    {
      "name": "Create Deal (Hot Lead)",
      "type": "n8n-nodes-base.hubspot",
      "config": {
        "operation": "create_deal",
        "dealname": "{{ $json.first_name }} — {{ $json.company_size }}-person company",
        "dealstage": "qualifiedtobuy",
        "dealvalue": "0",
        "associatedContacts": [
          {
            "id": "{{ $json.contact_id }}"
          }
        ]
      }
    },
    {
      "name": "Slack Alert: Hot Lead",
      "type": "n8n-nodes-base.slack",
      "config": {
        "channel": "#sales-alerts",
        "text": "🔥 Hot lead: {{ $json.first_name }} from {{ $json.company_size }}-person company. [View in HubSpot](https://app.hubspot.com/contacts/)"
      }
    },
    {
      "name": "Update Lifecycle: Nurture (Cold Lead)",
      "type": "n8n-nodes-base.hubspot",
      "config": {
        "operation": "create_or_update_contact",
        "email": "{{ $json.email }}",
        "properties": [
          {
            "name": "lifecyclestage",
            "value": "subscriber"
          }
        ]
      }
    }
  ],
  "connections": {
    "trigger": ["Extract Contact Info"],
    "extract": ["Create Contact"],
    "create_contact": ["Score Lead"],
    "score_lead": {
      "true": ["Create Deal", "Slack Alert"],
      "false": ["Update Lifecycle"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Common Issues

Issue 1: Rate Limits (500 requests/day)

Solution: Batch operations into one run per hour instead of real-time. Use a Schedule Trigger set to hourly, and bulk-update contacts in a loop.

Issue 2: Contact Dedup Timing

HubSpot dedupes on email, but sometimes takes 30–60 seconds. If you create a contact and immediately query by email, you might get a 404. Solution: Add a 2-second wait after creation.

Issue 3: Property Name Mismatch

HubSpot API uses snake_case for property names (e.g., hs_lead_status, lifecyclestage), NOT camelCase. Check your custom properties in Settings → Properties to get exact names.

Real-World Example: Roofing Contractor

The problem: 47 leads/month → 0 follow-up → lost deals

The solution:

  1. Lead form submission → HubSpot contact created
  2. If budget confirmed: create deal, add to "Sales Qualified" list
  3. If no budget: add to nurture email sequence
  4. Slack alert sales team in real-time

Result: 3 deals/month closed (was 0). ROI: $4K/month net new revenue from $99 one-time n8n setup.

Next Steps

  1. Connect HubSpot API key to n8n
  2. Map your form fields to HubSpot contact properties
  3. Test with 1 lead — check HubSpot to confirm creation
  4. Add scoring logic based on your highest-value customer profile
  5. Deploy + monitor — watch Slack for alerts, refine routing rules weekly

Want a done-for-you workflow? I build custom HubSpot + n8n automations for SMBs. $99 one-time build or $299/mo retainer.

Looking for more n8n tutorials? Check out the n8n Integration Guides series covering Stripe, Airtable, Notion, Google Sheets, and 20+ more.

Get the free lead magnet: 5 Real n8n Workflow Case Studies ($19 bundle) — see the exact ROI and implementation details from roofing, e-commerce, SaaS, and agencies.

Top comments (0)