Component Libraries •
Project Templates
Docs •
Install •
Tutorials •
Developer Guides •
Contribute •
Blog •
Discord
Xircuits Component Library for Twilio! Integrate Twilio services seamlessly into your workflows.
A Xircuits component library for integrating Twilio services into your workflows. This library provides components for SMS, WhatsApp messaging, voice calls, and TwiML generation.
Before you begin, you will need the following:
- Python3.9+.
- Xircuits.
- Twilio account credentials:
- Account SID
- Auth Token
You can provide credentials either as environment variables (TWILIO_ACCOUNT_SID
, TWILIO_AUTH_TOKEN
) or directly within the components.
- TwilioAuth: Initializes a Twilio client using provided credentials.
-
TwilioSendSMS: Sends an SMS message.
-
TwilioSendWhatsApp: Sends a WhatsApp message.
-
TwilioGetMessageStatus: Retrieves the status of a sent message.
-
TwilioListMessages: Lists message history.
- TwilioMakeCall: Initiates a voice call.
- TwilioGetCallStatus: Checks the status of a call.
Create TwiML response instructions for interactive voice and messaging automation:
- TwilioMakeTwiMLSay: Converts text to speech.
- TwilioMakeTwiMLPlay: Plays an audio file.
- TwilioMakeTwiMLDial: Forwards a call.
- TwilioMakeTwiMLGather: Collects user input via voice.
- TwilioMakeTwiMLMessage: Creates messaging responses.
- Uses
TwilioAuth
andTwilioSendSMS
to send automated text messages.
- Combines TwiML components with
TwilioMakeCall
to create interactive voice menus.
- Use
TwilioSendWhatsApp
for WhatsApp business messaging
- Integrates with Xircuits Flask components to create an AI-powered phone number that can:
- Respond to messages.
- Make automated calls.
- Handle voice interactions.
- Process user input.
- Always initialize TwilioAuth first in your workflow
- Use environment variables for secure credential management
- Monitor message and call status with the respective status components
- Combine with other Xircuits libraries for advanced automation
To use this component library, ensure that you have an existing Xircuits setup. You can then install the Twilio library using the component library interface, or through the CLI using:
xircuits install twilio
You can also install it manually by cloning the repository:
# base Xircuits directory
git clone https://github.com/XpressAI/xai-twilio xai_components/xai_twilio
pip install -r xai_components/xai_twilio/requirements.txt