CORTEXFLOW · FREE FOREVER

AI Agents

AI Voice Agent for Lead Calling & Appointment Booking

↓ Download workflow JSON

Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.

How it works

  1. Lead Webhook receives the lead — your form or CRM POSTs the lead’s name, phone, and notes to the webhook URL.
  2. Normalize Fields cleans the input — trims whitespace and strips non-dialable characters from the phone number, so every downstream step gets consistent data.
  3. Qualify Lead (AI agent) judges intent — GPT reads the lead’s notes and decides whether they show real buying intent, replying with a strict JSON verdict: qualified true/false plus a one-line reason.
  4. Parse Decision extracts the verdict — a Code node safely pulls qualified and reason out of the AI’s JSON, keeping the rest of the flow deterministic.
  5. IF Qualified routes the flow — qualified leads continue down the calling path; everyone else is sent to the nurture tag.
  6. Trigger Voice Call starts the AI call — an HTTP request fires your voice provider (Vapi, Twilio, or similar) to call the lead.
  7. Book Calendar Event creates the follow-up — the call books a follow-up event on your calendar through the Google Calendar API.
  8. Notify Team posts to Slack — your team sees who was called, when the follow-up is, and why the lead qualified.
  9. Tag Nurture files the rest — unqualified leads are tagged nurture so you can follow up with them later.

Set up steps

You’ll need:

  • n8n (self-hosted or cloud) with webhook access
  • An OpenAI account — get an API key at platform.openai.com → API keys
  • An AI voice provider (Vapi, Twilio, or similar) — sign up and get an API key plus your call endpoint URL
  • A Google account with Calendar access — create a Header Auth credential with an OAuth2 bearer token, or swap in n8n’s Google Calendar node
  • A Slack workspace — create a Slack app at api.slack.com and complete OAuth2
  1. Download the workflow JSON using the download button on this page.
  2. In n8n, go to Workflows → ⋯ → Import from file and select the JSON.
  3. Create your OpenAI credential — in n8n go to Credentials → New → OpenAI, paste your API key, save. Then open the OpenAI Chat Model node and select your credential.
  4. Connect your voice provider — in n8n go to Credentials → New → Header Auth, add a header named Authorization with the value Bearer YOUR_API_KEY, save. Open Trigger Voice Call, select the credential, and replace the placeholder URL (https://api.your-voice-provider.com/v1/calls) with your provider’s real call endpoint.
  5. Connect Google Calendar — create a Header Auth credential with your Google OAuth2 bearer token and select it in Book Calendar Event (or replace the node with n8n’s Google Calendar node). Adjust the event start-time logic in the node body to match your timezone.
  6. Connect Slack — in n8n go to Credentials → New → Slack, complete OAuth2, save. Open Notify Team, select your credential, and set your channel.
  7. Activate the workflow (toggle, top-right), then POST a test lead to the Lead Webhook URL.

Human approval note: voice calls fire only for AI-qualified leads. Before going live, review the Parse Decision output on real leads — and if you want a human sign-off on every call, insert a Wait node between IF Qualified and Trigger Voice Call so nothing is dialed without review.

Customize it

  • Tighten qualification — edit the system prompt in Qualify Lead to add your own criteria (budget, geography, company size).
  • Change the call script — edit the JSON body in Trigger Voice Call to pass your provider’s script, voice, or prompt parameters.
  • Smarter scheduling — replace the fixed “tomorrow at 10:00 UTC” logic in Book Calendar Event with your availability rules or a round-robin across your team.
  • Log every decision — add a Google Sheets node after Parse Decision to record each lead, verdict, and reason for later review.

Workflow nodes

This workflow is built from 10 nodes. Here's what each one does:

#NodeTypeWhat it does
1 Lead Webhook Webhook Entry point — receives incoming HTTP requests that trigger the workflow.
2 Normalize Fields Set Holds editable configuration values — fill in your own settings here before activating.
3 Qualify Lead AI Agent The AI brain — reasons over the task and calls tools to get it done.
4 OpenAI Chat Model OpenAI Chat Model The language model powering the AI agent.
5 Parse Decision Code Runs custom JavaScript to transform, filter, or compute data between steps.
6 IF Qualified IF Splits the flow into branches based on a condition.
7 Trigger Voice Call HTTP Request Calls an external API or webhook endpoint.
8 Book Calendar Event HTTP Request Calls an external API or webhook endpoint.
9 Notify Team Slack Posts messages or reads data in Slack.
10 Tag Nurture Set Holds editable configuration values — fill in your own settings here before activating.

Setup instructions

1. Add your credentials

In n8n go to Credentials → New, create each credential below, then open the named node and select it:

NodeCredential to add
OpenAI Chat Model OpenAI API
Trigger Voice Call HTTP Header Auth
Book Calendar Event HTTP Header Auth
Notify Team Slack OAuth2

How this workflow starts

  • Webhook: Listens on path /lead-intake — copy the production URL from the node after activating the workflow.

Use cases

Every minute between a form submission and your first contact costs you the deal. This template is for businesses that collect inbound leads — through a website form, a booking page, or a CRM — but can't call back fast enough. The Lead Webhook receives the lead the moment it's submitted, Normalize Fields cleans the phone number into a dialable format, and an AI agent called Qualify Lead reads the notes and returns a strict JSON verdict: qualified or not, plus a one-line reason. Qualified leads trigger an AI voice call through your provider (Vapi, Twilio, or similar), the workflow then books a follow-up on your Google Calendar via Book Calendar Event, and Notify Team posts who was called, when the follow-up is, and why they qualified to Slack. Everyone else gets a nurture tag via Tag Nurture so they're filed for later instead of forgotten.

Home services company with a flood of quote requests

A roofing or HVAC company getting 20–30 quote requests a day usually loses half of them to a competitor who called first. Wire your website's quote form to the Lead Webhook and the workflow calls back within a minute — no dispatcher needed. Qualify Lead reads the notes field ("roof leaking in two spots, needs quote this week" vs. "just browsing prices") and only real intent fires the Trigger Voice Call request, so you're not paying for calls to tire-kickers. The calendar booking defaults to tomorrow at 10:00 UTC; adjust the event logic in Book Calendar Event to your timezone and crew availability. Variation: start conservative — insert a Wait node between IF Qualified and Trigger Voice Call so your office manager approves each call before it dials, then remove the gate once you trust the AI's judgment.

Real estate agency working nights and weekends

Listing inquiries arrive at 11 PM, but the agent on call is showing a house. With this workflow live, a late-night inquiry gets an instant qualification check and an AI voice call while the buyer is still on their couch scrolling. Edit the system prompt in Qualify Lead to add your real criteria — budget range, preferred neighborhoods, pre-approval status — so renters get tagged nurture instead of burning call credits. The Notify Team Slack post tells the morning agent exactly who was called, when the follow-up event is, and why the lead qualified, so the handoff is seamless. Tip: tighten the call script parameters in Trigger Voice Call to offer a specific viewing slot ("I have Thursday 4 PM or Friday 11 AM") — two choices convert better than an open-ended "when works for you?"

B2B agency chasing demo requests

A 10-person agency gets demo requests from its site but half are students doing research or vendors selling something. Qualify Lead acts as your bouncer: tune its system prompt with company size, industry, and role criteria, and only real prospects reach Trigger Voice Call. For auditability, add a Google Sheets node after Parse Decision to log every lead, verdict, and reason — after a week you'll see which sources send the best leads and can sharpen the prompt. Practical tip: the Normalize Fields step strips non-dialable characters from phone numbers, but it can't fix a wrong country code, so make your form require a country picker up front.

SaaS company following up on free-trial signups

Trial users who never activate are the easiest revenue to recover. POST each new signup to the Lead Webhook, and Qualify Lead can score intent from signup data — company size, team seats invited, features clicked — all stuffed into the notes field. Qualified signups get a voice call offering a 15-minute onboarding session, and Book Calendar Event drops it straight on the rep's calendar while the prospect is still thinking about the product. Because the flow is fully automatic, one rep can cover the trial volume that used to need three. Variation: swap the fixed scheduling for a round-robin across your sales team by editing the calendar logic, so the follow-up lands with whoever is on shift.

Local clinic or consultancy filling its consultation diary

A physiotherapy clinic or financial advisor lives on booked consultations, and inbound inquiries often sit in an inbox for hours. This workflow turns each inquiry into a call and a booked slot within minutes. Book Calendar Event sends the invite through the Google Calendar API with the client attached, and the Slack notification keeps the front desk in the loop without anyone watching the form. Unqualified inquiries (outside your service area, wrong service type) are tagged nurture automatically — revisit them later with an educational email series instead of losing them.

← All templates