Route new social leads to intake webhook for processing
Each new Facebook lead form submission is posted as clean JSON to your intake system, so leads are processed the moment they arrive.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/route-new-social-leads-to-intake-webhook-for-processing/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Marketing · Lead management
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/route-new-social-leads-to-intake-webhook-for-processing
Set it up with the CLI
- Add it. Copies the folder into
zaps/route-new-social-leads-to-intake-webhook-for-processing/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/route-new-social-leads-to-intake-webhook-for-processing - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy route-new-social-leads-to-intake-webhook-for-processing - Check it. Its recent runs, with status and errors.
npx zap-pack logs route-new-social-leads-to-intake-webhook-for-processing
zaps/route-new-social-leads-to-intake-webhook-for-processing/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 1 to fill in
- connections/facebook-lead-ads.tsThe
facebook-lead-adsaccount it uses - triggers/lead.tsWhat starts it:
facebook-lead-adslead - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a new lead is submitted on a Facebook Lead Ads form (
facebook-lead-ads,lead). The default form setting covers every form on the Page. - Webhooks by Zapier (
webhook) POSTs a JSON body to the intake endpoint. The body has the contact name, email and phone, the notes, the ad's form, page and ad IDs, and the submission time. It also includes the raw lead payload for troubleshooting.
The body carries personal contact details, so send it only to an endpoint you control.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | What goes there |
|---|---|
REPLACE_INTAKE_WEBHOOK_URL |
The intake endpoint URL that receives the lead JSON: a Webhooks by Zapier catch hook, or the user's own URL |
Also review these with the user:
INCLUDE_RAW_LEADinworkflow.ts:trueadds the raw lead payload to the body for troubleshooting;falseleaves it out.- Which Facebook Page and lead form should trigger the Zap? "Default (Any Form)" covers every form on the Page.
- Does the intake endpoint need an API key? The workflow sends no header; see Notes.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/route-new-social-leads-to-intake-webhook-for-processing, replace each REPLACE_… value as this file says, then run npx zap-pack deploy route-new-social-leads-to-intake-webhook-for-processing, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
facebook-lead-adsto the user's Facebook Lead Ads connection for the Page that owns the lead form. Webhooks by Zapier needs no connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/lead.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connections (and sample the trigger, if it has one) before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run it once as a draft test with the intake endpoint set to one you control, using this sample input:
{
"full_name": "Test Lead",
"email": "test.lead@example.com",
"phone_number": "+15555550100",
"comments": "[install-test] sample lead",
"created_time": "2026-10-29T10:15:00Z",
"form_id": "1234567890",
"page_id": "0987654321",
"ad_id": "1122334455"
}
Check that the endpoint receives one JSON body with contact, notes, ad and submitted_at filled in. The sample's field names are not verified against Facebook's real payload, so check the real keys on the first run and fix the mapping in workflow.ts if they differ. If run-status tools aren't available, check the result in your intake system directly. Then publish, confirm the trigger is active, and do the real thing once: submit a test lead on the form. Ask the user to delete the test lead and any record it created; the agent doesn't delete test data.
Notes
- The API key header is not built. The spec wants the key stored in a connection, and Webhooks by Zapier has no connection for it. To add one, put the key in a header on the POST action from the user's own secret store, never in
workflow.ts. - A dedupe lookup and a Formatter step (normalizing phone numbers or timestamps) are not built. Add them before the POST if needed.
- Never commit a real intake URL or Page ID. Anyone with the intake URL can post leads to your system.