Connect Meta Lead Ads to WhatsApp
On this page
Connect a Facebook Page that runs Lead Ads to a WhatsApp inbox in Deskwoot: every form fill on Facebook or Instagram becomes a new conversation with the full form data. Your approved WhatsApp template goes out as soon as Meta delivers the lead and opens the 24 hour reply window.
What you need before connecting
- A Facebook Page that owns the Lead Ads.
- A Meta app with the Lead Ads webhook subscribed at the app level.
- A page token with these permissions:
pages_show_list,pages_read_engagement,pages_manage_metadata,leads_retrieval. Get a long lived one (60 days) so you don't have to refresh it every week. - The app secret, from Settings > Basic in your Meta app.
- A WhatsApp inbox with the Cloud API, already set up in Deskwoot.
- At least one approved WhatsApp message template in Meta Business Manager. It can have placeholders (
{{1}},{{2}}, ...), which you fill in Deskwoot.
Connect the Page
- In Deskwoot, go to Settings > Integrations > Meta Lead Ads.
- Click Connect a Facebook page.
- Paste the Page ID, the long lived Page token and the App secret.
- Under Inbox, pick the WhatsApp inbox where conversations should land.
- Type the name of your approved welcome template and its language code, for example
lead_welcomeanden_US. - Click Connect page.
Configure the webhook in your Meta app
- Under Connected Facebook pages, click your Page.
- Copy the 2 values the panel shows under What do you enter at Meta?
- Callback URL, like
https://deskwoot.com/api/webhooks/meta-leadgen/<your-slug> - Verify token, a random string for this Page
- Callback URL, like
- Paste both into your Meta App Dashboard under Webhooks, Page, Edit Subscription.
Each connected Page gets its own slug and verify token, so a leak on one Page never authorizes a webhook for another Page.
Fetch the form fields
Deskwoot calls Graph /<page_id>/leadgen_forms?fields=questions and pulls every question key from every active form on this Page, so you can pick them for the placeholders.
- In the same panel, under Which fields do your forms have?, click Fetch fields.
- Check the question keys that appear below the button.
Field mapping

The section Where do the answers go? tells Deskwoot which question of the Meta lead form goes into which contact field. The defaults are sensible:
email,EMAILor whatever your form calls it goes to Email. The email decides who the contact is: Deskwoot finds or creates the contact by email first and falls back to the phone number.full_namegoes to Name.phone_numbergoes to Phone, cut to digits only before Deskwoot stores it as the WhatsApp ID.
If your form also asks for the company or the job title, add a row for each:
- Under Where do the answers go?, click Add matching.
- In the new row, type the question key into the field Field at Meta, for example email.
- In the list of the same row, pick Company or Job title.
Template placeholders
WhatsApp templates use {{1}}, {{2}}, ... placeholders in their text.
- Under Placeholders in the template, click Add placeholder until there is one row for each placeholder of your template, in order.
- In each row, pick where its placeholder comes from:
- Lead's first name, taken from the
full_namemapping - Your account's name, the display name of your Deskwoot account
- Fixed text, a text you type
- Form field, any field you fetched above
- Lead's first name, taken from the
- Click Save to keep the field mapping and the placeholders.
A template without placeholders needs no row: remove the rows with the x next to them.
How a lead arrives
- Meta sends a lead webhook to your Page's own URL, signed with HMAC
x-hub-signature-256. - Deskwoot checks the signature against your app secret and silently skips the lead if it doesn't match.
- Deskwoot fetches the full lead through Graph
GET /<leadgen_id>. - Deskwoot finds or creates the contact and fills it from the form, as you mapped the fields.
- Deskwoot opens a new conversation in your WhatsApp inbox, with the full form data in
customAttributes.metaLeadAd. - Deskwoot sends the welcome template through the WhatsApp Cloud API. It lands on the lead's phone and opens the 24 hour reply window, and your agent (or Fynn, if Fynn is the assignee) takes it from there.
Disconnect a Page
- Under Connected Facebook pages, click Disconnect next to the Page.
- Confirm with Disconnect.
Deskwoot calls Meta's DELETE /<page_id>/subscribed_apps to stop further webhooks, then deletes the connection here. Even if Meta returns an error (token expired, Page deleted), the connection is still deleted.
Frequently asked questions
Does the lead get a message right away?
Which inbox can receive the leads?
Do I have to subscribe the Page to my app myself?
POST /<page_id>/subscribed_apps?subscribed_fields=leadgen so the Page really starts sending lead webhooks. The subscription of the app alone delivers nothing, so Deskwoot does this for you.Can one lead create two conversations?
MetaLeadAdLead row with UNIQUE(accountId, leadgenId). Meta retries a delivery up to 7 times over 5 days, and these repeats never create a second conversation.How do I see whether leads arrive?
Was this guide helpful?
Keep reading
- Connect WhatsApp BusinessConnect your WhatsApp Business number through Meta's official WhatsApp Cloud API, which is free to set up, and answer WhatsApp chats in Deskwoot.Read guide
- Connect WooCommerceSee each customer's WooCommerce orders in the conversation, and refund, cancel or mark them shipped without leaving Deskwoot.Read guide
- Connect Shopify and manage ordersConnect your Shopify store through your own Shopify app. Your team sees each customer's orders next to the conversation, can refund, cancel or mark them shipped, and Fynn answers order questions.Read guide