Automated Outbound Calls: connect Ultravox AI Agents to Phone Calls with Twilio
Last edited 58 days ago
This workflow transforms n8n into a call automation system, where AI agents can talk directly with people over the phone using Twilio.
This workflow integrates Ultravox AI voice agents with Twilio’s telephony service to fully automate outbound phone calls.
Ultravox generates the AI conversation and audio, while Twilio handles the PSTN connection to the actual phone network, with the two services connected in real-time via a media stream.
Key Advantages
-
AI-Powered Conversations – Leverage Ultravox agents to handle natural, real-time dialogues with customers.
-
Seamless Telephony Integration – Twilio ensures reliable phone call delivery worldwide.
-
Flexible Setup – You can easily change the target phone number, agent, or Twilio line directly in the workflow.
-
Scalable Outreach – Automates outbound calls for customer support, sales, or appointment reminders.
-
Step-by-Step Guidance – The workflow includes clear instructions for:
- Buying and configuring a Twilio number
- Creating an Ultravox agent
- Executing the final call
How it Works
- Manual Trigger: The workflow is started manually by a user within n8n.
- Set Parameters: The "Set Params" node defines the crucial variables for the call: the Ultravox
agent_id, the Twilio phone number to call from (twilio_number), and the destinationphone_numberto call. - Initiate Ultravox Session: The "Create Ultravox Call" node sends an HTTP POST request to the Ultravox API. It specifies the agent to use and, crucially, informs Ultravox that the call will be handled by Twilio (
medium: { twilio: {} }). Ultravox responds with a uniquejoinUrl(a WebSocket stream URL). - Place the Twilio Call: The "Twilio Call" node uses the details from the previous steps. It instructs Twilio to make a call from the specified
twilio_numberto the targetphone_number. The key instruction (twiml) tells Twilio to connect the call to thejoinUrlprovided by Ultravox, effectively streaming the audio between the participant and the AI agent.
Set Up Steps
-
Twilio Configuration:
- Log into your Twilio Console.
- Buy a phone number under the "Phone Numbers" section.
- Obtain your "Account SID" and "Auth Token" from the dashboard.
- In the "Twilio Call" node credentials, add your Twilio Account SID and Auth Token.
- In the "Set Params" node, set the
twilio_numbervalue to your newly purchased Twilio number (e.g.,+1xxxxxxx).
-
Ultravox Configuration:
- Log into your Ultravox App.
- Create a new AI Agent by configuring its voice, tools, and system prompt.
- Copy the ID of your newly created agent.
- In the "Set Params" node, set the
agent_idvalue to your Ultravox agent's ID.
-
Execute the Call:
- In the "Set Params" node, set the
phone_numbervalue to the destination number you wish to call (e.g.,+1xxxxxxxx). - Execute the workflow manually from the n8n editor. The AI agent will call the specified number through Twilio.
- In the "Set Params" node, set the
Need help customizing?
Contact me for consulting and support or add me on Linkedin.
You may also like
New to n8n?
Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!





