Quick overview
This workflow captures new Facebook Lead Ads submissions, stores them in Supabase, and uses ElevenLabs Conversational AI (via Twilio outbound calls) to auto-qualify leads during business hours. When the call completes, it updates the lead record and notifies your team via Slack and Gmail based on the outcome.
How it works
- Triggers when a new Facebook Lead Ads form submission is received.
- Normalizes the lead fields, checks Supabase for an existing record by Facebook lead ID, and skips duplicates.
- Inserts the new lead into a Supabase leads table and checks whether the current time is within your configured calling window.
- If within calling hours, sends an HTTP request to ElevenLabs to start an outbound AI phone call to the lead and updates Supabase with the conversation ID and call status, or logs a failure and alerts the team in Slack.
- If outside calling hours, updates the lead in Supabase as queued for manual callback and posts an after-hours notification to Slack.
- Receives an ElevenLabs post-call webhook, extracts the transcript, summary, qualification, and booking signals, and updates the matching Supabase lead record by call ID.
- Routes the result as booked, qualified (no booking), or other, then sends a tailored Slack message and (for booked and qualified) a detailed Gmail email including the transcript.
Setup
- Connect credentials for Facebook Lead Ads, Supabase, Slack, and Gmail OAuth2.
- Create/configure an ElevenLabs Conversational AI agent with a Twilio-linked phone number and add an HTTP Header Auth credential for the ElevenLabs API.
- Create a Supabase
leads table (or update the table name) with fields used by the workflow such as fb_lead_id, call_id, status, call_status, transcript and summary fields.
- Select the Facebook Page and Lead Form in the Facebook Lead Ads trigger.
- Fill in the Configuration and Notification Settings values (ElevenLabs agent ID, phone number ID, business timezone/hours, notification email, and Supabase table name) and choose the target Slack channel(s) in each Slack step.
- Copy the webhook URL from the “ElevenLabs Call Complete” trigger and paste it into your ElevenLabs agent’s post-call webhook configuration so call results are sent back to n8n.
Additional info
Qualify Facebook lead ads with an AI voice agent and Supabase
Need help customizing?
Contact me for consulting and support : Linkedin
MY NEW YOUTUBE CHANNEL
👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.
