How do I connect Meta lead ads to WhatsApp follow-up?

To connect Meta lead ads to WhatsApp follow-up, subscribe your app to the Page's leadgen webhook, fetch the lead with its leadgen_id, then send an approved WhatsApp template message to the phone number the lead entered. The trigger is a webhook call from Meta, so any CRM, automation tool or small script can do it as long as it holds the right permissions and has the lead's consent to be messaged.

Key takeaways

  • Meta pushes a leadgen webhook event with a leadgen_id; you then call GET /{leadgen_id} for the field values.
  • The app needs leads_retrieval plus Page permissions, and a long-lived Page access token so the connection does not expire.
  • The first WhatsApp message to a lead is outside a customer service window, so it must be an approved template.
  • Add a phone question to the instant form and keep the opt-in wording visible, or the follow-up has nothing legitimate to send to.
  • Most failures are permission, token or phone-format problems, and they are easy to test one at a time.

What are the steps to connect a lead form to WhatsApp?

  1. Add the right form fields. In Ads Manager open the ad, then Instant form, and add a Phone number question. Add a short consent line saying the person may be contacted on WhatsApp.
  2. Create the app and permissions. Per Meta's lead retrieval documentation, request leads_retrieval, pages_manage_ads, pages_show_list and ads_management. Webhook set-ups also need pages_manage_metadata.
  3. Install the app on the Page and subscribe to leadgen. The same documentation says to configure your endpoint, generate a long-lived Page access token and install the app on the Page.
  4. Handle the event. Meta's webhook payload has "field": "leadgen" and a value object with leadgen_id. Call GET /{leadgen_id} to read the answers.
  5. Send the WhatsApp template. Per Meta's template documentation, templates are the only message type allowed outside a customer service window, and each template is classed as authentication, marketing or utility. A first follow-up to a form lead is normally a marketing or utility template, approved before you use it.
  6. Log the result. Write the lead id, send time and delivery status back to your CRM so you can measure speed to lead.

What does the webhook payload and send call look like?

The shapes below are simplified examples, not full payloads. Check field names against Meta's documentation before shipping.

// Webhook event (simplified example)
{ "entry": [{ "changes": [{ "field": "leadgen",
  "value": { "leadgen_id": "123456789", "form_id": "987654321" } }] }] }

// Then fetch the lead
GET /123456789?access_token=PAGE_TOKEN

// Then send an approved template (simplified example)
{ "messaging_product": "whatsapp", "to": "+15551234567", "type": "template",
  "template": { "name": "lead_followup", "language": { "code": "en_US" },
  "components": [{ "type": "body", "parameters": [{ "type": "text", "text": "Sam" }] }] } }

Template parameters can be named or positional; positional values must appear in the same order as the numbered placeholders in the template text, as described in the template documentation linked above.

Why is my lead-to-WhatsApp flow not firing?

SymptomLikely causeCheckFix
No webhook events at allApp not installed on the Page, or leadgen not subscribedWebhooks section of the app dashboard; Page subscriptionsInstall the app on the Page and subscribe to the field
Event arrives, lead fetch returns a permission errorMissing leads_retrieval or an expired tokenToken debugger; granted permissionsRe-issue a long-lived Page token with the permissions above
Lead fetched, no WhatsApp messagePhone not in international format, or template not approvedRaw phone value; template status in WhatsApp ManagerNormalise to E.164 (+ country code); wait for approval
Messages send but nobody repliesTemplate wording unclear or consent line missingTemplate text against the form's consent lineName the business and the ad offer in the first line

Lead form follow-up or click-to-WhatsApp ads: which should you use?

A lead form collects details first and messages later, so it depends on a template send. A click-to-WhatsApp ad opens the chat directly, and the entry point sets the free messaging window. Meta changed those windows recently; see our note on click-to-WhatsApp lead costs after 1 October 2026. If your leads go cold between form and reply, compare cost per qualified conversation for both set-ups rather than cost per form.

How do you check this in your account?

Submit a test lead from Meta's Lead Ads Testing Tool, watch your endpoint log, and confirm the three steps in order: event received, lead fetched, template accepted. If CPA climbs after you change the form, a separate diagnosis applies; our CPA spike playbook covers it. AIChatAssist reads the ad account and flags cost problems, but it does not build this webhook for you; the flow above runs in your own stack.

Frequently asked questions

Do I need the WhatsApp Business API to follow up on leads?

To send template messages programmatically, yes: you send through the WhatsApp Business Platform, with templates approved in advance.

Can I message a lead on WhatsApp without opt-in?

Do not. Add a consent line to the instant form so the person agrees to be contacted on WhatsApp, and keep a record of it.

Why does the first message have to be a template?

Because the lead has not messaged you first, there is no customer service window, and templates are the only message type allowed outside one.

Can I do this without code?

Yes. Automation tools and CRMs can receive the Meta webhook and send a template, but they use the same permissions and template rules described above.

How do I test it?

Use Meta's Lead Ads Testing Tool to submit a sample lead, then check the event, the lead fetch and the template send in turn.