how to build voice ai for inbound calls A developer detailed a workflow for building a voice AI agent that answers inbound calls, qualifies leads, and books meetings automatically using Vapi, Twilio, Calendly, and n8n. The setup involves creating a Vapi agent via API, configuring Twilio to forward calls, and using n8n to orchestrate webhooks and calendar scheduling. The developer provided step-by-step instructions and configuration snippets for reproducibility. 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. | 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. 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. https://your-n8n-instance.com/webhook/vapi-inbound . Tip:Twilio will send a POST request with CallSid , From , and To on every inbound call. n8n will use those fields to correlate the call with Vapi. 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 /v1/agents endpoint, creating an agent that asks the caller for name, company, and a brief need description, then forwards the captured slots to a webhook. curl -X POST https://api.vapi.ai/v1/agents \ -H "Authorization: Bearer YOUR VAPI API KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Lead Qualifier", "voice": "en-US-Standard-C", "prompt": { "system": "You are a friendly sales development rep. Greet the caller, ask for name, company, and a short description of their challenge. Then say: I will send you a link to book a time with our specialist.", "temperature": 0.7 }, "slots": {"name": "caller name", "type": "string", "question": "May I have your name?"}, {"name": "company", "type": "string", "question": "Which company are you representing?"}, {"name": "challenge", "type": "string", "question": "Briefly describe the problem you want to solve."} , "on complete": { "webhook url": "https://your-n8n-instance.com/webhook/vapi-complete", "method": "POST" } }' Replace YOUR VAPI API KEY with the secret you generate in the Vapi dashboard under API Keys . After a successful call, the response contains an agent id ; copy that value for the next step. Now tell Twilio to forward the call audio to the Vapi agent you just created. AGENT ID you recorded: