How to Set Up Facebook Lead Ad → HubSpot + Instant Slack Alert in n8n
A Facebook Lead Ad that isn't wired into your CRM within seconds is a leak in your pipeline. The moment someone taps "Submit" on your lead form, they are the warmest they will ever be — mid-scroll, mi
A Facebook Lead Ad that isn't wired into your CRM within seconds is a leak in your pipeline. The moment someone taps "Submit" on your lead form, they are the warmest they will ever be — mid-scroll, mildly curious, and completely forgotten by tomorrow. If your team finds out about that lead when someone manually exports a CSV from Meta the next afternoon, you have already lost. This article shows you how to build a n8n workflow that captures every Facebook Lead Ad submission straight into HubSpot and fires a Slack alert to your team in under five seconds — no zapping, no polling delays, no monthly per-task pricing.
The problem: leads decay in minutes, not days
Meta's own Lead Ads dashboard is a dead end. Leads pile up inside the Ads Manager, and unless you pay for a native CRM sync (available only on a handful of integrations) or manually download the leads file, that data sits in a silo. The two most common "solutions" are both broken:
- Manual CSV export. Someone remembers to log in, download the leads, and import them into HubSpot. This happens once a day at best, and every hour of delay tanks your contact rate. Studies on speed-to-lead consistently show that responding within five minutes dramatically outperforms responding within an hour.
- Generic SaaS connectors. Tools like Zapier work, but they poll on a schedule (often 1–15 minutes on lower tiers), charge per task, and get expensive fast once you run multiple campaigns. You are also locked into their data-handling rules.
The result is the same: a hot lead becomes a cold record, your sales rep calls a prospect who has already forgotten filling out the form, and your cost-per-acquisition quietly inflates because the ad spend worked but the follow-up didn't.
The solution: a real-time, event-driven pipeline you own
Instead of polling, we use Facebook's webhook. When a lead submits a form, Meta pushes the event to n8n instantly. n8n then does three things in sequence: fetches the full lead details from the Graph API, upserts the contact into HubSpot, and posts a formatted alert into Slack. The entire chain executes in a couple of seconds, and because you host n8n yourself (or on n8n Cloud), there is no per-task fee and no rate-limited polling.
The architecture is deliberately simple and robust:
- Facebook Lead Ads Trigger → receives the webhook the instant a form is submitted.
- HubSpot node → creates or updates the contact so you never get duplicates.
- Slack node → pings the right channel with the lead's name, email, phone, and the campaign that produced them.
Three nodes, one outcome: your team knows about the lead before the prospect closes the app.
Step-by-step: building it in n8n
Here is the exact node configuration. This assumes you have a n8n instance (self-hosted or Cloud), a Facebook App with the leads_retrieval and pages_manage_ads permissions, a HubSpot account, and a Slack workspace.
1. Facebook Lead Ads Trigger node
Add the Facebook Lead Ads Trigger node as your entry point. Authenticate with OAuth2 using your Facebook App credentials, then select the Facebook Page running your ads and the specific Form (or all forms on the page). n8n registers the webhook subscription with Meta automatically. When you activate the workflow, n8n exposes a production webhook URL that Meta will call on every submission. Send a test lead using Meta's Lead Ads Testing Tool to confirm the trigger fires and to capture a sample payload for field mapping.
2. Retrieve the full lead (if needed)
The webhook payload sometimes contains only a leadgen_id rather than the full field data. Add a Facebook Graph API node (HTTP Request also works) to call GET /{leadgen_id}?fields=field_data,created_time,campaign_name. This returns the full field_data array — an array of {name, values} objects. Use a Set or Code node to flatten it into clean properties. A tiny Code snippet does this reliably:
const fields = {};
for (const f of $json.field_data) {
fields[f.name] = f.values[0];
}
return { json: fields };
Now you have email, full_name, phone_number, and any custom questions as first-class fields.
3. HubSpot node — upsert the contact
Add the HubSpot node, authenticated via a Private App token (recommended over the legacy API key). Set Resource to Contact and Operation to Create or Update. Map Email to {{ $json.email }} as the unique identifier — HubSpot uses email to deduplicate, so a returning lead updates the existing record instead of spawning a copy. Map the remaining fields: First Name, Last Name (split from full_name), Phone, and a custom property like lead_source set to the campaign name. Add original_source or a lifecycle stage of Lead so your workflows and reports pick it up cleanly.
4. Slack node — the instant alert
Add the Slack node, authenticate with a Slack App token or OAuth2, set Operation to Send Message, and choose your channel (e.g. #new-leads). Use Slack Block Kit or a simple formatted message so the alert is scannable:
🔥 New Facebook Lead
*Name:* {{ $json.full_name }}
*Email:* {{ $json.email }}
*Phone:* {{ $json.phone_number }}
*Campaign:* {{ $json.campaign_name }}
⏱ Call within 5 minutes.
Connect the nodes in order — Trigger → Graph API → Code → HubSpot → Slack — then toggle the workflow to Active. Run one more test lead and watch it land in HubSpot and Slack within seconds.
The benefits: speed, ownership, and zero per-lead tax
Once this is live, the change is immediate and measurable:
- Sub-5-second speed-to-lead. Reps get pinged while the prospect is still holding their phone. Contact rates climb without spending a cent more on ads.
- No duplicate contacts. The create-or-update operation keyed on email keeps your HubSpot database clean, so reporting and workflows stay accurate.
- No per-task pricing. Run 10 leads a month or 10,000 — the cost of the workflow is the same. At scale, this alone pays for your n8n instance many times over.
- Full data ownership. The lead data flows through infrastructure you control. Nothing sits in a third-party black box, which matters for compliance and for building on top of the data later.
- Extensible. Because it's n8n, adding an SMS auto-reply, a round-robin assignment, or an enrichment step is just one more node — not a new subscription.
Common pitfalls (and how to avoid them)
Most failures happen for a handful of predictable reasons. Handle these up front and the workflow runs untouched for months:
- Missing permissions. If leads never arrive, your Facebook App almost certainly lacks
leads_retrievalor the Page access token expired. Meta requires App Review for these scopes in production — do this before you rely on it. Test-mode leads work without full review, real leads do not. - Page vs. form subscription. The webhook must be subscribed at the Page level. If you created new forms after subscribing, re-verify the trigger picks them up, or subscribe to all forms on the page.
- Empty field data. Trusting the webhook payload alone bites people — always fetch the lead via
leadgen_idso you get the completefield_data. Field internal names also differ from the labels shown in Ads Manager; inspect a real payload before mapping. - HubSpot rate limits and token type. Use a Private App token, not the deprecated API key. If you run large campaigns, HubSpot's API limits can throttle bursts — n8n's built-in retry on the node handles transient 429s gracefully; enable it.
- No error handling. Attach an Error Trigger workflow that posts to Slack if the main flow fails, so a broken token or expired permission surfaces immediately instead of silently dropping leads. A missed lead you don't know about is worse than one you do.
- Testing with real ad spend. Always validate with Meta's Lead Ads Testing Tool first. Debugging a live campaign by burning budget is an expensive way to find a mapping typo.
Build it once, test it twice, and every Facebook Lead Ad you ever run from that point forward lands in HubSpot and lights up Slack before the prospect has switched apps. That's the difference between paying for leads and actually closing them.
Ja construimos isso pra voce
Nao comece do zero. O Facebook Lead Ad → HubSpot + Instant Slack Alert e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.
Instalar por $49 →