Skip to content

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

NameLabelTypeDescriptionRequired
usernameAccount SIDSTRINGThe Account SID from your Twilio account.true
passwordAuth TokenSTRINGThe Auth Token from your Twilio account.true

Actions

Send SMS

Name: sendSMS

Send a new SMS message

Properties

NameLabelTypeDescriptionRequired
ToToSTRINGThe recipient’s phone number in E.164 format.true
FromFromSTRINGThe 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
BodyBodySTRINGThe 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

NameTypeDescription
bodySTRING
numSegmentsSTRING
directionSTRING
fromOBJECT
Properties {STRING(rawNumber)}
toSTRING
dateUpdatedOBJECT
Properties {DATE_TIME(dateTime), STRING(zoneId)}
priceSTRING
errorMessageSTRING
uriSTRING
accountSidSTRING
numMediaSTRING
statusSTRING
messagingServiceSidSTRING
sidSTRING
dateSentOBJECT
Properties {DATE_TIME(dateTime), STRING(zoneId)}
dateCreatedOBJECT
Properties {DATE_TIME(dateTime), STRING(zoneId)}
errorCodeINTEGER
currencyOBJECT
Properties {STRING(currencyCode), INTEGER(defaultFractionDigits), INTEGER(numericCode)}
apiVersionSTRING
subresourceUrisOBJECT
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

NameLabelTypeDescriptionRequired
ToToSTRINGThe recipient channel address.true
FromFromSTRINGThe sender’s Twilio channel address.true
useTemplateUse TemplateBOOLEAN
Options true, false
Use a template for the message body.true
ContentSidContent SidSTRINGThe SID of the content template to be used for the message body.true
ContentVariablesnullOBJECT
Properties {}
Key-value pairs of template variables and their substitution values.false
BodyBodySTRINGThe 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

NameTypeDescription
bodySTRING
numSegmentsSTRING
directionSTRING
fromOBJECT
Properties {STRING(rawNumber)}
toSTRING
dateUpdatedOBJECT
Properties {DATE_TIME(dateTime), STRING(zoneId)}
priceSTRING
errorMessageSTRING
uriSTRING
accountSidSTRING
numMediaSTRING
statusSTRING
messagingServiceSidSTRING
sidSTRING
dateSentOBJECT
Properties {DATE_TIME(dateTime), STRING(zoneId)}
dateCreatedOBJECT
Properties {DATE_TIME(dateTime), STRING(zoneId)}
errorCodeINTEGER
currencyOBJECT
Properties {STRING(currencyCode), INTEGER(defaultFractionDigits), INTEGER(numericCode)}
apiVersionSTRING
subresourceUrisOBJECT
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

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"
}