You can have a Vapi agent answer every inbound call, ask qualifying questions, and hand the prospect off to Calendly to lock in a meeting - all without writing a single line of custom telephony code.
The result is a self-contained voice AI agent that routes calls, captures lead data, and books calendar slots automatically. voice is the audible sound produced by a human speaker that can be captured, transmitted, and synthesized by software. voice AI agent is a software component that receives spoken input over a phone line, runs speech-to-text, applies a language model, and returns synthesized speech to the caller.
Below you'll find everything you need to reproduce the exact workflow, from the required services to the n8n JSON that creates the Vapi agent, plus the pitfalls that usually bite new builders.
What you need Tool Plan / Price Role Vapi Free tier or paid plan - check the Vapi pricing page Voice AI platform that hosts the conversational model and performs voice synthesis Twilio Pay-as-you-go voice minutes - check Twilio pricing Provides the inbound phone number and SIP termination for Vapi Calendly Free tier or paid plan - check Calendly pricing Calendar link generator and meeting scheduler n8n (self-hosted) Community edition - free (Docker) Orchestrates the webhook chain between Vapi, Twilio, and your CRM HubSpot CRM (optional) Free tier - check HubSpot pricing Stores qualified lead details for follow-up Estimated build time: 1-2 days for a minimal production-ready flow, assuming you already have accounts for the services above. how to build voice ai for inbound calls The core of the solution is a Vapi "agent" that runs a scripted dialogue, a Twilio phone number that forwards calls to Vapi, and an n8n workflow that receives the webhook payload, enriches the lead, and creates a Calendly event.
Follow each numbered step precisely; the configuration values are written exactly as they appear in the UI.
1.
Provision a Twilio phone number Log into the Twilio Console and navigate to Phone Numbers → Manage → Active Numbers.
Click Buy a Number, select a local US number, and press Buy.
In the Configure tab for the new number, set Voice & Fax → A CALL COMES IN to Webhook and paste the URL that n8n will expose later (e.g., ).
Save the changes.
Tip: Twilio will send a request with , , and on every inbound call. n8n will use those fields to correlate the call with Vapi.
2.
Create a Vapi agent that qualifies leads Vapi agents are defined via a JSON payload that describes the prompt, voice synthesis settings, and webhook callbacks.
Use the Vapi dashboard or API; the snippet below is the API version for reproducibility.
What this does: Sends a POST request to Vapi's endpoint, creating an agent that asks the caller for name, company, and a brief need description, then forwards the captured slots to a webhook.
Replace with the secret you generate in the Vapi dashboard under API Keys.
After a successful call, the response contains an ; copy that value for the next step.
3.
Wire Twilio to Vapi Now tell Twilio to forward the call audio to the Vapi agent you just created.
In the Twilio Console, open the phone number's Voice configuration again.
Change A CALL COMES IN from Webhook to Twiml Bin.
Create a new Twiml Bin with the following XML, inserting the you recorded: Save the Twiml Bin and associate it with the phone number.
Twilio now streams the call directly into the Vapi agent, which will run the qualification script defined earlier.
4.
Set up the n8n webhook for Vapi completion n8n will receive the lead data once the Vapi dialogue ends, enrich it, push it to HubSpot (optional), and generate a Calendly link.
Create a new workflow in n8n and add a Webhook node.
Set the HTTP Method to and the Path to .
Add a Set node to rename fields to match HubSpot's property names: From To (Optional) Add a HubSpot node configured with your API key to Create Contact using the fields from the Set node.
Add an HTTP Request node that calls Calendly's "Creat