👉 n8n No Limits Access :

https://www.hostg.xyz/SHHAd

Hébergement VPS n8n | Automatisation sécurisée et évolutive

coupon -15% : DRFIRAS15

👉 Formation n8n en Français

Formation n8n en Français : Automatisation & Agents IA

coupon -20% : LANCEMENT : HERE


Course: Qualify Facebook lead ads with an AI voice agent and Supabase

This workflow fires the instant someone submits a Facebook Lead Ads form. It saves the lead to Supabase, skips it if it's a duplicate, and — if you're inside your configured calling hours — instantly launches an outbound AI voice call through ElevenLabs Conversational AI to qualify the lead and try to book a meeting. When the call ends, ElevenLabs posts the results back to a second webhook: the Supabase row gets updated and the team receives a Slack + email notification tailored to the outcome (booked / hot lead / other). Outside calling hours, or if the call itself fails, the team is notified for a manual callback instead of the lead being silently dropped.

Flow diagram (text)

WORKFLOW A — Lead intake
Facebook Lead Ads Trigger → Configuration → Format Lead Data → Check Existing Lead (Supabase)
  → Is New Lead?
      TRUE  → Insert Lead (Supabase) → Within Calling Hours?
                  TRUE  → Trigger ElevenLabs Call (HTTP)
                              success → Save Call ID (Supabase)
                              error   → Log Call Failure (Supabase) → Notify Team: Call Failed (Slack)
                  FALSE → Mark Lead Queued (Supabase) → Notify Team: After-Hours Lead (Slack)
      FALSE → Skip: Duplicate Lead (No Op)

WORKFLOW B — Post-call analysis
ElevenLabs Call Complete (Webhook) → Notification Settings → Extract Call Data → Update Lead Row (Supabase)
  → Route by Outcome (Switch)
      Booked             → Slack: Booked → Email: Booked
      Qualified, Not Booked → Slack: Hot Lead → Email: Hot Lead Follow Up
      Other (fallback)   → Slack: Call Completed (Other)

Prerequisites & credentials

Service Credential type How to get it
Facebook Lead Ads OAuth2 (facebookLeadAdsOAuth2Api) In n8n, add credential → Facebook Lead Ads → follow the OAuth popup with a Facebook Business account that has admin access to your Ads/Page/Lead form.
ElevenLabs Header Auth (httpHeaderAuth) Get your API key from elevenlabs.io → Profile → API Keys. In n8n create a Header Auth credential named "ElevenLabs API" with Name: <code>xi-api-key</code> or <code>Authorization</code> (check current ElevenLabs docs) and Value: your key.
Supabase Supabase API (supabaseApi) In your Supabase project → Settings → API. Copy the Project URL and the service_role (or anon, depending on your RLS setup) key into the n8n Supabase credential.
Slack Slack API (Bot Token) Create a Slack app at api.slack.com/apps, add the <code>chat:write</code> scope, install it to your workspace, invite the bot to your notification channel, then paste the Bot User OAuth Token into n8n.
Gmail OAuth2 (gmailOAuth2) Standard n8n Gmail OAuth2 connection.

<aside> ⚠️

You also need a Supabase table (default name leads) with at least these columns: fb_lead_id, full_name, email, phone, company_name, status, fb_form_id, ad_id, campaign_id, platform, call_id, call_status, call_error, call_started_at, call_ended_at, call_duration_seconds, transcript, call_summary, sales_qualified, appointment_booked, call_terminate_reason, call_successful.

</aside>

Node-by-node build guide

1. New Facebook Lead — n8n-nodes-base.facebookLeadAdsTrigger (v1)

Trigger node, no resource/operation. Configure: