meta lead pipeline
A webhook-driven Meta lead pipeline that routes new leads through sales, messaging, enrichment, and feedback loops.
tldr
An end-to-end Meta lead operating system: ingest the lead once, fan it out to sales and messaging, track outcomes, and feed later conversions back into Meta.
the problem
Paid leads lose value when the initial webhook is treated as the finish line. The lead needs a durable record, fast routing, follow-up, enrichment, call outcome tracking, and eventual feedback to the ad platform.
what it is
A webhook-driven Meta lead pipeline that routes new leads through sales, messaging, enrichment, and feedback loops.
why it is useful
It makes paid lead generation operational: every lead is logged, contacted, enriched, measured, and eventually fed back into ad optimization.
architecture
An always-on Express service receives signed Meta webhooks and normalizes multiple form schemas into a shared Google Sheet. Scheduled Railway functions call guarded `/jobs/*` endpoints that spawn sync scripts for calls, bookings, no-shows, CAPI feedback, and funnel reporting.
how it works
- Meta sends a signed webhook that is verified and normalized across form variants.
- The lead is deduplicated by leadgen ID and written to the shared operational record.
- Routing fans the lead out to Slack, Sheets, JustCall, SMS, and optional outbound systems.
- Scheduled jobs synchronize calls, bookings, no-shows, CAPI events, and funnel reporting back into the system.
implementation notes
- Fans a new lead out to Slack, Sheets, JustCall, SMS, and an optional outbound webhook.
- Uses leadgen ID deduplication, HMAC verification, and multi-form field normalization.
- Syncs AI and human call outcomes back to lead records.
- Builds and deploys a funnel report from spend through shows and revenue.
engineering decisions
- Uses HMAC verification and leadgen ID deduplication at the ingestion boundary.
- Keeps the webhook fast by moving slower enrichment and reporting work into scheduled jobs.
- Normalizes multiple form schemas into one internal shape so downstream workflows stay stable.