Lead Generation · n8n

Capture Inbound WhatsApp Enquiries as CRM Leads Automatically

An n8n workflow that turns every first-time WhatsApp message into a CRM lead — creating a contact with the phone number, the enquiry text and a source tag, then alerting sales — so businesses running WhatsApp click-to-chat ads never lose an interested customer to an unanswered thread.

difficulty Intermediatesetup 55 minresult Every new WhatsApp enquirer becomes a tagged CRM lead with a sales alert in seconds
  1. 1

    Receive the message

    Add a Webhook node subscribed to the WhatsApp messages event. A Code node extracts the sender's phone number, the message text, and any referral ad data from the payload.

  2. 2

    Look up the contact

    An HTTP Request searches your CRM for a contact with that phone number. An IF node then splits: found (existing) versus not found (new lead). This is the de-duplication gate.

  3. 3

    Create the lead (new numbers)

    For new numbers, an HTTP Request creates a CRM contact with the phone, the enquiry text as a note, lead_source: WhatsApp, and the ad name if present. The lead is now trackable in your pipeline.

  4. 4

    Append a note (existing contacts)

    For known numbers, an HTTP Request adds the new message as a timeline note on the existing contact, so history stays in one place instead of spawning duplicate records.

  5. 5

    Alert sales

    Both paths end at a Slack node telling sales a WhatsApp lead is waiting, with the number, message and whether they're new or returning. Speed-to-reply is everything on WhatsApp — this makes it possible.

Frequently asked questions

How does it know who's a new lead versus an existing customer?

It checks the CRM for a contact matching the sender's phone number before creating one. New numbers become leads; known numbers just get the message appended as a note. This prevents your CRM filling with duplicates every time a customer messages again.

Can it capture the ad or referral source?

Yes. WhatsApp click-to-chat and Click-to-WhatsApp ads include a `referral` object in the first message payload with the ad headline and source. The workflow reads it and stores it as the lead source, so you can attribute which campaign drove each conversation.

Does it reply to the customer too?

You can bolt that on. This recipe focuses on capture and alerting, but adding a WhatsApp send node after lead creation lets you fire an instant 'thanks, a human will be right with you' acknowledgement — which dramatically improves the chance the lead stays engaged.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.