Setting up Twilio integration
The Twilio integration is currently in beta. If you are participating in the beta program, we'd love to hear your feedback! Please email your thoughts and experiences to [email protected].
If you're interested in joining the beta to try out this exciting new capability, please visit our signup form here to request access. We'll notify you as soon as a spot becomes available.During the beta period, please keep in mind that:
- Some features may still be under active development
- Documentation may be incomplete or subject to change
We greatly appreciate your willingness to be an early adopter and help shape the future of voice AI!
Overview
The Twilio integration enables you to connect your Twilio account to Voiceflow, allowing your voice agents to receive phone calls using real phone numbers. This integration bridges the gap between Voiceflow's AI orchestration capabilities and the telephony network, opening up exciting new use cases such as:
- Customer support hotlines powered by intelligent voice agents
- Voice-based sales and lead qualification workflows
- Appointment scheduling
- Contactless pickup and delivery coordination for restaurants and retailers
Video Tutorial
Getting Started
To set up the Twilio integration, you'll need to have a Twilio account with an active phone number, as well as Editor permissions in your Voiceflow workspace. Here's how to get started:
- Generate Twilio API credentials
- Log in to your Twilio console and navigate to the Account Info section on the dashboard.
- Save the Account SID and Auth token for your account.
Before proceeding, ensure you've setup a phone number in your Twilio account that is ready to connect to your agent.
-
Enable the integration in Voiceflow (from Workspace)
-
Open your Voiceflow workspace and go to Phone Numbers.
-
Click Import Numbers and input the number you want to use.
-
Enter your Twilio Account SID, Auth Token.
-
Optionally, add a friendly name for your number.
-
Click Import to connect your accounts.
-
-
Enable the integration in Voiceflow (from Agent)
- Open your Voiceflow agent and go to the Integrations > Telephony tab.
- Follow same steps as above.
-
Assign a phone number to your agent
-
Open your agent and go to the Integrations > Telephony tab.
-
Under Phone Numbers, click Assign existing number.
-
Choose a number and the environment (Development/Production) to route calls to.
Reminder: Agents come with two built-in environments: the development and production environments. The development environment is what you edit with the Voiceflow canvas, while the production environment is the version that is automatically created (or updated) when you publish your agent.
-
-
Test the integration by calling your agent from a real phone.
Change the Agent Assigned to a Phone Number
- Go to the Integrations > Telephony tab for the agent you want to unassign.
- Under Phone Numbers, click the Unassign option in the more menu next to the number.
- Navigate to the same tab in the agent you want to reassign the number to.
- Click Assign existing number and select the newly unassigned number.
- Choose the environment and click Assign number.
Best Practices & Tips
- Assign separate phone numbers for your Development and Production agent environments. This ensures that test calls don't interfere with production traffic.
- Verify the caller experience by dialing the phone numbers yourself before publicizing them to end users.
Troubleshooting
Integration Authorization Error
- Double check that you've entered your Twilio credentials (Account SID, Auth Token, Phone Number) correctly.
- If issue persists, check if your Twilio account is suspended due to lack of funds.
Calls Not Routing to Voiceflow Agent
-
Ensure that the Routing region is US. If it is not, please select US and then press 're-route' to save, you should see a URL that starts with https://runtime-api.voiceflow.com/... in the 'A call comes in' section.
-
On Twilio, if you are porting a number from another service, check your number's Configure With isn't on an existing TwiML App or SIP Trunk. If so, select the Webhook, TwiML Bin, Function, Studio Flow, Proxy Service option and save the configuration. Then reassign the agent on Voiceflow.
- If the "A call comes in" - "URL" starts with
https://runtime-api.voiceflow.com/...
then it's correct.
- If the "A call comes in" - "URL" starts with
-
Confirm that the phone number has been properly assigned to the correct agent and environment in Voiceflow.
-
Check that the agent's Interaction Endpoint URL has been correctly configured in the Twilio phone number's webhook settings.
-
Verify that the agent is reachable and not throwing errors by testing it in the Voiceflow prototype tool.
Sorry, no agents are available to take your call at this time.
- If you hear this message from the agent it means you've hit the limit for concurrent sessions for your plan. See limits below:
- Starter: 1 call
- Pro: 5 calls
- Team: 15 calls
- Enterprise: 100 calls
Next Steps
- Explore the ASR/TTS options to customize the voice interaction behaviours.
- Learn how to configure advanced voice workflows using custom actions.
- Join the Voiceflow Community to get inspired by what other builders are creating.
Updated 3 days ago