Twilio
Twilio is a cloud communications platform that enables developers to integrate messaging, voice, and video capabilities into their applications.
Categories: Communication
Type: twilio/v1
Connections
Version: 1
Basic Auth
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| username | Account SID | STRING | The Account SID from your Twilio account. | true |
| password | Auth Token | STRING | The Auth Token from your Twilio account. | true |
Actions
Make Outbound Call
Name: makeCall
Initiates an outbound voice call and executes a real-time workflow synchronously during the call. The action blocks until the call completes, allowing real-time audio processing and AI conversations.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| To | To | STRING | The phone number to call in E.164 format. | true |
| From | From | STRING | Your Twilio phone number in E.164 format. | true |
| subWorkflow | Real-Time Workflow | STRING | The workflow ID to execute synchronously during the phone call. This workflow handles real-time audio processing and AI responses via WebSocket streaming. | true |
| timeout | Ring Timeout | INTEGER | Maximum time in seconds to wait for the call to be answered. If not answered within this time, the call fails. | false |
| maxDuration | Max Call Duration | INTEGER | Maximum duration in minutes to wait for the call to complete. After this time, the action returns with a timeout status. | false |
Example JSON Structure
{
"label" : "Make Outbound Call",
"name" : "makeCall",
"parameters" : {
"To" : "",
"From" : "",
"subWorkflow" : "",
"timeout" : 1,
"maxDuration" : 1
},
"type" : "twilio/v1/makeCall"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| callSid | STRING | Unique identifier for the call |
| status | STRING | Final call status (completed, failed, busy, no-answer, timeout) |
| duration | INTEGER | Call duration in seconds |
| direction | STRING | Call direction (outbound-api) |
Output Example
{
"callSid" : "",
"status" : "",
"duration" : 1,
"direction" : ""
}Send SMS
Name: sendSMS
Send a new SMS message
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| To | To | STRING | The recipient's phone number in E.164 format. | true |
| From | From | STRING | The sender's Twilio phone number (in E.164 format), alphanumeric sender ID, Wireless SIM, short code, or channel address (e.g., whatsapp:+15554449999). The value of the from parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using messaging_service_sid, this parameter can be empty (Twilio assigns a from value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. | true |
| Body | Body | STRING | The text content of the outgoing message. SMS only: If the body contains more than 160 GSM-7 characters (or 70 UCS-2 characters), the message is segmented and charged accordingly. For long body text, consider using the send_as_mms parameter. | true |
Example JSON Structure
{
"label" : "Send SMS",
"name" : "sendSMS",
"parameters" : {
"To" : "",
"From" : "",
"Body" : ""
},
"type" : "twilio/v1/sendSMS"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| body | STRING | |
| numSegments | STRING | |
| direction | STRING | |
| from | OBJECT Properties{STRING(rawNumber)} | |
| to | STRING | |
| dateUpdated | OBJECT Properties{DATE_TIME(dateTime), STRING(zoneId)} | |
| price | STRING | |
| errorMessage | STRING | |
| uri | STRING | |
| accountSid | STRING | |
| numMedia | STRING | |
| status | STRING | |
| messagingServiceSid | STRING | |
| sid | STRING | |
| dateSent | OBJECT Properties{DATE_TIME(dateTime), STRING(zoneId)} | |
| dateCreated | OBJECT Properties{DATE_TIME(dateTime), STRING(zoneId)} | |
| errorCode | INTEGER | |
| currency | OBJECT Properties{STRING(currencyCode), INTEGER(defaultFractionDigits), INTEGER(numericCode)} | |
| apiVersion | STRING | |
| subresourceUris | OBJECT Properties{} |
Output Example
{
"body" : "",
"numSegments" : "",
"direction" : "",
"from" : {
"rawNumber" : ""
},
"to" : "",
"dateUpdated" : {
"dateTime" : "2021-01-01T00:00:00",
"zoneId" : ""
},
"price" : "",
"errorMessage" : "",
"uri" : "",
"accountSid" : "",
"numMedia" : "",
"status" : "",
"messagingServiceSid" : "",
"sid" : "",
"dateSent" : {
"dateTime" : "2021-01-01T00:00:00",
"zoneId" : ""
},
"dateCreated" : {
"dateTime" : "2021-01-01T00:00:00",
"zoneId" : ""
},
"errorCode" : 1,
"currency" : {
"currencyCode" : "",
"defaultFractionDigits" : 1,
"numericCode" : 1
},
"apiVersion" : "",
"subresourceUris" : { }
}Send WhatsApp Message
Name: sendWhatsAppMessage
Send a new WhatsApp message.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| To | To | STRING | The recipient channel address. | true |
| From | From | STRING | The sender's Twilio channel address. | true |
| useTemplate | Use Template | BOOLEAN Optionstrue, false | Use a template for the message body. | true |
| ContentSid | Content Sid | STRING | The SID of the content template to be used for the message body. | true |
| ContentVariables | null | OBJECT Properties{} | Key-value pairs of template variables and their substitution values. | false |
| Body | Body | STRING | The text content of the outgoing message. | true |
Example JSON Structure
{
"label" : "Send WhatsApp Message",
"name" : "sendWhatsAppMessage",
"parameters" : {
"To" : "",
"From" : "",
"useTemplate" : false,
"ContentSid" : "",
"ContentVariables" : { },
"Body" : ""
},
"type" : "twilio/v1/sendWhatsAppMessage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| body | STRING | |
| numSegments | STRING | |
| direction | STRING | |
| from | OBJECT Properties{STRING(rawNumber)} | |
| to | STRING | |
| dateUpdated | OBJECT Properties{DATE_TIME(dateTime), STRING(zoneId)} | |
| price | STRING | |
| errorMessage | STRING | |
| uri | STRING | |
| accountSid | STRING | |
| numMedia | STRING | |
| status | STRING | |
| messagingServiceSid | STRING | |
| sid | STRING | |
| dateSent | OBJECT Properties{DATE_TIME(dateTime), STRING(zoneId)} | |
| dateCreated | OBJECT Properties{DATE_TIME(dateTime), STRING(zoneId)} | |
| errorCode | INTEGER | |
| currency | OBJECT Properties{STRING(currencyCode), INTEGER(defaultFractionDigits), INTEGER(numericCode)} | |
| apiVersion | STRING | |
| subresourceUris | OBJECT Properties{} |
Output Example
{
"body" : "",
"numSegments" : "",
"direction" : "",
"from" : {
"rawNumber" : ""
},
"to" : "",
"dateUpdated" : {
"dateTime" : "2021-01-01T00:00:00",
"zoneId" : ""
},
"price" : "",
"errorMessage" : "",
"uri" : "",
"accountSid" : "",
"numMedia" : "",
"status" : "",
"messagingServiceSid" : "",
"sid" : "",
"dateSent" : {
"dateTime" : "2021-01-01T00:00:00",
"zoneId" : ""
},
"dateCreated" : {
"dateTime" : "2021-01-01T00:00:00",
"zoneId" : ""
},
"errorCode" : 1,
"currency" : {
"currencyCode" : "",
"defaultFractionDigits" : 1,
"numericCode" : 1
},
"apiVersion" : "",
"subresourceUris" : { }
}Triggers
Inbound Voice Call
Name: inboundCall
Triggers when an inbound voice call is received. Returns TwiML that establishes a WebSocket connection for real-time audio streaming and AI conversation.
Type: STATIC_WEBHOOK
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| subWorkflow | Real-Time Workflow | STRING | The workflow ID to execute synchronously during the phone call. This workflow handles real-time audio processing and AI responses. | true |
Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| callSid | STRING | Unique identifier for the call |
| from | STRING | Caller phone number |
| to | STRING | Called phone number |
| direction | STRING | Call direction (inbound/outbound) |
| accountSid | STRING | Twilio account SID |
| callStatus | STRING | Call status |
JSON Example
{
"label" : "Inbound Voice Call",
"name" : "inboundCall",
"parameters" : {
"subWorkflow" : ""
},
"type" : "twilio/v1/inboundCall"
}New WhatsApp Message
Name: newWhatsappMessage
Triggers when a new WhatsApp message is received.
Type: STATIC_WEBHOOK
Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
JSON Example
{
"label" : "New WhatsApp Message",
"name" : "newWhatsappMessage",
"type" : "twilio/v1/newWhatsappMessage"
}What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
How is this guide?
Last updated on