Artificial Intelligence

Getting AI to CALL your leads for you? | @elevenlabsio + @twilio + Xano

Imagine an AI agent that can call your leads, greet them by name, hold a real conversation, and then automatically log feedback about whether a follow-up is needed — all without you lifting a finger. In this guide, you'll learn exactly how to wire up ElevenLabs, Twilio, and Xano to make that happen.

What You'll Need Before You Start

To follow along, you'll need paid accounts on ElevenLabs and Twilio, plus a Xano workspace. You'll also want a Google API key for powering the analysis agent inside Xano. Once those are in place, you're ready to build.

Setting Up Your ElevenLabs Agent

Start by creating a conversational agent inside ElevenLabs. You can use one of their templates and customize the first message to include a dynamic variable — for example, greeting the caller by name using curly bracket syntax like {{name}}. Enable the "fetch initiation client data from webhook" toggle so the agent can pull that personalized data before any call begins.

Next, configure your post-call webhook inside ElevenLabs and set the authentication method to HMAC. You'll generate a secret key here and store it as an environment variable in Xano. This key is what you'll use later to verify that incoming webhook payloads are legitimate.

Building the Xano Backend

Your Xano backend needs three API endpoints: a pre-call handler, a post-call handler, and an outbound call trigger.

The pre-call endpoint receives the caller's phone number from ElevenLabs, looks up the matching user account in your database, and returns the dynamic variables — like the caller's name and user ID — in the exact format ElevenLabs expects.

The post-call endpoint receives the full conversation payload after a call ends. Here, you'll implement HMAC verification using a Lambda function to ensure only valid requests are processed. Once verified, the raw conversation data is stored to a database table, and then passed to an analysis agent you build inside Xano's Agent Builder.

Analyzing Calls with an AI Agent

Inside Xano's AI tools, you'll create an analysis agent powered by Google's model. Give it a system prompt that instructs it to return structured JSON containing fields like issue, sentiment, and whether a follow-up is needed. Connect a custom tool that writes this output directly to a feedback table in your database — automatically created using Xano's database assistant.

Handling Outbound and Inbound Calls

For outbound calls, you'll use ElevenLabs' API to initiate a Twilio-powered call to any phone number you supply as input. Store your ElevenLabs API key and agent/phone number IDs as environment variables for clean, reusable configuration.

For inbound calls, you'll update the pre-call logic to detect whether the caller ID belongs to your agent (outbound scenario) or a real user (inbound scenario), and route the lookup accordingly.

You can also attach a knowledge base to your ElevenLabs agent — uploading documents or URLs so the agent can answer specific questions about your product or service during calls.

Where to Go From Here

Once everything is connected, your system can automatically log every call, assess whether a follow-up is needed, and trigger downstream workflows like scheduling callbacks or sending emails. A one-click Xano snippet is available so you can install this entire workflow and customize it for your own use case.

Sign up for Xano

Join 100,000+ people already building with Xano.
Start today and scale to millions.