Capture WhatsApp Leads in HubSpot with n8n
Ready to automate?
Browse 5,000+ copy-paste n8n workflow templates.
Where Leads Fall Through the Cracks
WhatsApp Business is the primary inbound channel for companies across Latin America, Southeast Asia, the Middle East, and increasingly Europe. Prospects send pricing questions, service inquiries, and product requests directly to a business WhatsApp number — and then nothing happens automatically.
The sales team reads the messages. Sometimes they manually copy contact details into a CRM. Often they forget. By the time a follow-up happens, the lead has already moved on.
The workflow below closes that gap. When a message arrives in your WhatsApp Business inbox, n8n captures the sender's details, checks whether they already exist in HubSpot, creates or updates the contact, and opens a deal in the right pipeline stage — in under three seconds.
Prerequisites
- A WhatsApp Business account connected to the Meta Cloud API (not the WhatsApp Business App — you need the API access version, configured through the Meta Developer Console)
- A Meta Developer App with a webhook subscription for the
messagesevent - HubSpot with API access (any tier supports contact and deal creation via API)
- An n8n instance with a publicly accessible URL — required for Meta to deliver webhook events
The Meta Cloud API is free for up to 1,000 business-initiated conversations per month. Inbound lead replies count differently, so most businesses stay well within the free tier.
The Workflow Blueprint
Step 1: Receive messages with a Webhook Trigger node
Add a Webhook node to a new n8n workflow. Set the method to POST and copy the generated URL. You'll register this URL in Meta Developer Console under WhatsApp → Configuration → Webhooks.
Meta requires a one-time verification handshake before it will send live events. When it sends the verification request, n8n will receive a GET request with query parameters hub.mode, hub.verify_token, and hub.challenge. Add an IF node after the Webhook Trigger: if hub.mode equals subscribe, use a Respond to Webhook node to return the value of hub.challenge. This satisfies the handshake and unlocks live message delivery.
Step 2: Extract contact data with a Set node
WhatsApp webhook payloads are nested. The relevant data lives inside entry[0].changes[0].value. Use a Set node to map the fields you need:
- Sender phone (E.164 format):
entry[0].changes[0].value.messages[0].from - Display name:
entry[0].changes[0].value.contacts[0].profile.name - Message text:
entry[0].changes[0].value.messages[0].text.body - Message timestamp:
entry[0].changes[0].value.messages[0].timestamp
Not every message will be a text message. Images, stickers, and voice notes will lack the text key. Before extracting, add an IF node that checks entry[0].changes[0].value.messages[0].type equals text. Route non-text messages to a separate path (or a No-op node) to prevent the workflow from failing on media messages.
Step 3: Search for an existing HubSpot contact
Use the HubSpot node (Search Contacts operation) to look up the sender's phone number. HubSpot stores numbers in the phone and mobilephone properties — query both.
WhatsApp delivers phone numbers in E.164 format with a leading + (e.g., +5511987654321). If your HubSpot contacts use a different format, use a Code node before the search step to strip or reformat the number.
After the search, add an IF node: if HubSpot returns one or more contacts, follow the existing-contact path; otherwise, follow the new-contact path.
Step 4: Create or update the HubSpot contact
New contact path: Use the HubSpot node (Create Contact operation). Set the phone number, split the display name into first and last name using a Code node (splitting on the first space), and add a custom property to mark the lead source as WhatsApp. This keeps your contact origin data clean for attribution reporting.
Existing contact path: Use the HubSpot node (Create Note operation or Update Contact operation) to log the incoming message as a timeline activity. This updates the contact's Last Modified Date, which can trigger HubSpot sequences or owner notifications automatically.
Step 5: Create a deal in HubSpot
Regardless of which path was taken, use the HubSpot node (Create Deal operation) to open a deal. Set:
- Deal name: the contact's display name + the text "WhatsApp Inquiry"
- Pipeline: your inbound leads pipeline
- Stage: the first stage ("New Lead," "Unqualified," or whatever your entry stage is called)
- Associated contact: the contact ID returned from the previous step
This ensures every WhatsApp inquiry appears in HubSpot's pipeline view as an actionable deal, not buried in a contact activity timeline.
Step 6: (Optional) Send a WhatsApp acknowledgment
Use the HTTP Request node to POST to the WhatsApp Cloud API messages endpoint (https://graph.facebook.com/v19.0/{PHONE_NUMBER_ID}/messages) with a pre-approved message template:
"Thanks for reaching out. A member of our team will follow up within one business day."
Replies to an inbound message within 24 hours can be free-form. Messages sent outside that window require a pre-approved template. Set the Bearer token in the HTTP Request node's authentication to your Meta App's access token.
Example n8n Workflow: End to End
- Webhook Trigger — receives POST events from Meta WhatsApp Cloud API
- IF node (verification check) — routes the initial Meta handshake challenge
- Respond to Webhook node — returns
hub.challengeto complete verification - IF node (message type filter) — routes only text messages downstream
- Set node — extracts phone number, display name, and message text
- HubSpot node (Search Contacts) — queries by phone number
- IF node (contact exists?) — branches on search result count 8a. HubSpot node (Create Contact) — creates new contact with lead source = WhatsApp 8b. HubSpot node (Create Note) — logs message on existing contact timeline
- HubSpot node (Create Deal) — opens deal in inbound pipeline
- HTTP Request node (optional) — sends acknowledgment via WhatsApp Cloud API
Why This Workflow Pays Off
The real cost of unautomated WhatsApp leads is not the time spent copying contact details into HubSpot — it's the leads that never make it there. When capture is manual, it's inconsistent. When it's automated, it's complete.
With this workflow active, HubSpot's existing machinery takes over: deal rotation assigns an owner, lead scoring updates, and sequences enroll the contact based on whatever rules you already have. The sales team sees a new deal in the queue, not a new notification in a WhatsApp group chat.
For businesses already running HubSpot sequences, this workflow slots in without any process change. It feeds the CRM; the CRM handles the rest.
Browse the n8nresources.dev template library for pre-built HubSpot and messaging workflow templates. For related patterns, see the CRM automation use cases and lead generation automation sections.
Enjoyed this article?
Share it with others who might find it useful