Facebook Lead Forms
Running Facebook or Instagram ads with a lead form? Send those leads into Your AI Connector the moment someone submits the form: each lead becomes a contact, your AI agent is assigned, and the first message goes out while they are still looking at your ad.
Facebook does not send leads to Your AI Connector directly. An automation platform (Zapier, Make or Pabbly) sits between the two: it watches your lead form and passes each new lead on to an automation in Your AI Connector, which creates the contact, hands the chat to your AI agent and sends the first WhatsApp message.
Prerequisites
Before you start, make sure you have:
- Facebook Ads Manager access with permission to create Lead Ads.
- An automation platform account: Zapier, Make (Integromat) or Pabbly Connect.
- A WhatsApp channel connected and, if you message people who have not written to you first, an approved WhatsApp template. See WhatsApp Templates.
- An AI agent to follow up with the leads.
Step 1: Create your Facebook lead form
- Open Facebook Ads Manager.
- Create a new campaign with the Leads objective.
- At the ad level, choose Instant Form as the lead method.
- Build your form with the fields you need. At minimum, include:
- First name
- Phone number (with country code)
- Optional: Last name, email
- Publish the ad or save the form as a draft for testing.
The phone number needs its country code. Without it there is nowhere to send the WhatsApp message. If your form collects the number without one, add a formatting step in your automation platform that puts it in front.
Step 2: Create a test lead
Your automation platform needs one real lead to show you the form’s fields. Create it with Meta’s own tool:
- Open the Lead Ads Testing Tool.
- Select your Page and your lead form.
- Click Preview form, fill it in with your own details and submit.
- Click Track delivery (or check your Page’s Leads Center) to confirm the lead arrived.
Previewing the form inside Ads Manager shows you what it looks like, but it does not always produce a lead your automation platform can fetch. The testing tool does, and it has a Delete lead button for clearing test entries afterwards.
Step 3: Send the lead into an automation
Build the automation
- In Your AI Connector open Automations and click New automation.
- Search the left panel for Webhook and drag it onto the canvas. This is the trigger: it gives the automation its own web address.
- Copy the web address, then copy the secret. Your automation platform sends the secret with every lead, so nobody else can post to your address.
- Click Start listening under Listen for incoming webhooks and leave the tab open. It waits for your test lead so you can use its fields in the steps below.
Send the lead from your automation platform
- Create a new Zap / scenario / workflow.
- Set the trigger to Facebook Lead Ads, event New Lead.
- Connect your Facebook account and pick your Page and lead form.
- Run the trigger test. It pulls in the lead you created in Step 2.
- Add an action that posts to a web address: on Zapier that is Webhooks by Zapier, event POST (this step needs a paid Zapier plan); on Make it is the HTTP module; on Pabbly the API by Pabbly / HTTP action.
- Paste the web address into the URL field.
- Under the data / body, add a field for the first name and one for the phone number, each filled from the Facebook lead.
- Add a header named
X-Webhook-Secretwith the secret you copied. - Run the test step. The lead appears under the trigger in Your AI Connector: pick it as the sample, and its fields become available to every step after it.
Add the steps
Click the + after the trigger and add these in order:
- Create contact: fill Phone number and First name from the lead. If someone with that number is already a contact, the step uses that contact instead of creating a second one.
- Assign AI agent: insert the contact from the Create contact step as the Contact ID and pick the agent that should handle the conversation. Switch on Start follow-ups if they don’t reply so the agent chases a lead that goes quiet.
- Send WhatsApp template: pick your approved template, insert the same contact, and put the lead’s first name into the first template variable.
A template cannot be sent to a wrong number, so give that step somewhere to fail to: switch on Add an “If it fails” path and put Send email to my team on it. A lead with a typo in their number then still reaches a person.
See Automations for everything these steps can do.
Test it, then switch it on
- Set Test with to Example data and click Safe run. Nothing is sent: the template step reports Would send, with the name filled in.
- For the real test, put your own phone number in a test lead and click Run for real. The message should arrive on your phone within seconds.
- Turn the automation on with the Enabled switch. While it is off, no lead is messaged.
- Back in your automation platform, publish the Zap / scenario so it runs on every new lead.
Night-time leads. Open Automation settings and switch on Respect quiet hours if you would rather not message people at night: a lead that arrives inside your quiet hours is messaged when they end, in the contact’s own time zone. See Respecting quiet hours.
Tips
- Multiple forms: create a separate Zap / scenario per lead form, each pointing at its own automation (or the same one, if the same agent handles them all).
- Error notifications: set your automation platform to notify you if a step fails, so you don’t lose leads.
- Building with the API instead? See API Access to create contacts and add them to lists from your own tools.
Next Steps
- Automations: the full list of triggers, steps and settings.
- WhatsApp Templates: write and submit the message that greets a new lead.
- Click-to-WhatsApp Ad Attribution: see which ad each chat came from when your ads open WhatsApp directly.
- Webhooks: get notified when contacts are created or tagged.