- Documentation
- Integrations
- Apps
- Twilio integration
Twilio integration
Send SMS, MMS, voice, and WhatsApp, look up numbers, run Verify OTP flows, and react to inbound SMS and calls on Twilio.
What it does
The Twilio integration lets your agency run a client's messaging and voice program from inside a workflow. Connect a client's Twilio account once and your workflows can send SMS, MMS, and WhatsApp messages, place outbound calls, look up phone-number details, run Verify one-time-passcode flows, post messages into Twilio Conversations, and read message and call history. Two triggers start a workflow the moment an SMS or a voice call arrives on a Twilio phone number.
Twilio connects with an Account SID and Auth Token, not an OAuth sign-in. Every trigger and action is currently in beta.
Connect a Twilio account
Twilio uses API-key credentials, so you paste two values rather than authorizing through a redirect.
Open Connections
Open your workspace in TaskJuice and go to Connections.Start the Twilio connection
Choose Twilio and click Connect.Sign in to the Twilio Console
In a new tab, sign in to the Twilio Console at console.twilio.com as the client, or as your agency if the client has delegated credentials to you.
Copy your Account SID and Auth Token
Under Account Info, copy the Account SID (it starts with
AC) and the Auth Token.Save the connection
Paste both values into TaskJuice and save the connection. The Auth Token is stored encrypted and is never shown again in the browser.
The connection form has exactly two fields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
accountSid | text | Yes | none | Your Twilio Account SID (starts with AC). |
authToken | text (sensitive) | Yes | none | Your Twilio Auth Token from the Twilio Console. Stored encrypted. |
The Auth Token is the master credential for the entire Twilio account. Treat it like a password: store it only in TaskJuice and rotate it from the Twilio Console if it is ever exposed.
TaskJuice verifies inbound SMS and call webhooks with your Auth Token. When you rotate the token in the Twilio Console, update the TaskJuice connection right away, or inbound signature verification will start failing.
Triggers
Both triggers are webhook-based and single-event: one inbound POST from Twilio starts one workflow activation. Both require a connection and verify the request signature before activating. Both are in beta.
| Trigger | Slug | Fires when |
|---|---|---|
| Incoming SMS | twilio/incoming-sms | An SMS message is received on a Twilio phone number. |
| Incoming Call | twilio/incoming-call | A voice call is received on a Twilio phone number. |
Incoming SMS payload
| Field | Type | Always present | Description |
|---|---|---|---|
MessageSid | string | Yes | Unique id of the inbound message. |
AccountSid | string | Yes | The receiving account's SID. |
From | string | Yes | Sender's phone number. |
To | string | Yes | Recipient (your Twilio) number. |
Body | string | Yes | Text body of the message. |
NumMedia | string | No | Count of media items, as a string. |
FromCity | string | No | Sender city, if Twilio has geo data. |
FromState | string | No | Sender state, if available. |
FromCountry | string | No | Sender country, if available. |
ToCity | string | No | Recipient city, if available. |
ToState | string | No | Recipient state, if available. |
ToCountry | string | No | Recipient country, if available. |
Incoming Call payload
| Field | Type | Always present | Description |
|---|---|---|---|
CallSid | string | Yes | Unique id of the inbound call. |
AccountSid | string | Yes | The receiving account's SID. |
From | string | Yes | Caller's phone number. |
To | string | Yes | Called (your Twilio) number. |
CallStatus | string | Yes | Call status, for example ringing or in-progress. |
Direction | string | No | Call direction (inbound). |
CallerName | string | No | Caller name, if available. |
FromCity | string | No | Caller city, if available. |
FromState | string | No | Caller state, if available. |
FromCountry | string | No | Caller country, if available. |
ToCity | string | No | Called-number city, if available. |
ToState | string | No | Called-number state, if available. |
ToCountry | string | No | Called-number country, if available. |
Point your Twilio number at TaskJuice
Each trigger publishes a TaskJuice webhook URL. Set your Twilio phone number's Messaging or Voice webhook to that URL, either manually in the Twilio Console under the number's Messaging or Voice configuration, or programmatically with the Configure Phone Number Webhooks action.
Twilio signs each request by computing an HMAC-SHA1 over the request URL plus the alphabetically sorted POST parameters and sending the base64 digest in the X-Twilio-Signature header. TaskJuice verifies that signature with your Auth Token before activating the workflow. No extra shared-secret header is required.
Actions
The integration ships 14 actions, all in beta, all requiring a connection. Where a field reads "From Phone Number (dropdown)," TaskJuice loads your account's incoming Twilio numbers into a picker so you select instead of pasting an SID. Verify Service dropdowns work the same way for your Twilio Verify services. Both pickers load up to 200 entries.
Messaging
twilio/send-sms sends an SMS to a phone number.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from | dropdown | Yes | none | From Phone Number, picked from your account's numbers. |
To | string | Yes | none | Recipient in E.164 format, for example +15551234567. |
Body | string | Yes | none | Message text, up to 1600 characters. |
MediaUrl | string | No | none | A media URL; supplying it sends an MMS. |
StatusCallback | string | No | none | URL to receive delivery-status updates. |
Output: sid, status, to, from, body, date_created, price, error_code (string or null).
twilio/send-mms sends a multimedia message with an image or media attachment.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from | dropdown | Yes | none | From Phone Number, picked from your account's numbers. |
To | string | Yes | none | Recipient in E.164 format. |
MediaUrl | string | Yes | none | URL of the media file to send. |
Body | string | No | none | Text to send alongside the media. |
Output: sid, status, to, from, num_media, date_created.
twilio/send-whatsapp sends a WhatsApp message via Twilio. The From here is free text, not a dropdown.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
To | string | Yes | none | Recipient in whatsapp:+15551234567 format. |
From | string | Yes | none | Your WhatsApp-enabled Twilio sender, in whatsapp:+14155238886 format. |
Body | string | Yes | none | Message text. |
MediaUrl | string | No | none | A media URL to attach. |
Output: sid, status, to, from, body.
twilio/get-message retrieves details of a specific SMS or MMS message.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
messageSid | string | Yes | none | Message SID (starts with SM). |
Output: sid, status, to, from, body, date_created, date_sent, price, error_code (string or null), error_message (string or null).
twilio/list-messages lists SMS and MMS messages with optional filters.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
To | string | No | none | Filter by recipient number. |
From | string | No | none | Filter by sender number. |
DateSent | string | No | none | Filter by date in YYYY-MM-DD format. |
PageSize | number | No | 50 | Results per page, up to 1000. |
Output: messages[] (each with sid, status, to, from, body, date_sent) plus next_page_uri (string or null).
twilio/send-conversation-message sends a message in a Twilio Conversation.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
conversationSid | string | Yes | none | Conversation SID (starts with CH). |
Body | string | Yes | none | Message text. |
Author | string | No | none | Identity of the message author. |
Output: sid, conversation_sid, body, author, date_created.
Voice
twilio/make-call initiates an outbound phone call. Supply either inline TwiML or a TwiML URL, not both.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from | dropdown | Yes | none | From Phone Number, picked from your account's numbers. |
To | string | Yes | none | Callee in E.164 format. |
Twiml | string | No | none | Inline TwiML instructions. |
Url | string | No | none | URL that returns TwiML. |
StatusCallback | string | No | none | URL to receive call-status updates. |
Timeout | number | No | 60 | Seconds to wait for an answer. |
Output: sid, status, to, from, direction, date_created.
twilio/get-call retrieves details of a specific phone call.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
callSid | string | Yes | none | Call SID (starts with CA). |
Output: sid, status, to, from, direction, duration, start_time, end_time, price.
twilio/list-recordings lists call recordings with optional filters.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
CallSid | string | No | none | Filter by call SID. |
DateCreated | string | No | none | Filter by date in YYYY-MM-DD format. |
PageSize | number | No | 50 | Results per page, up to 1000. |
Output: recordings[] (each with sid, call_sid, duration, date_created, status) plus next_page_uri (string or null).
Phone numbers
twilio/list-phone-numbers lists incoming phone numbers on the account.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
PhoneNumber | string | No | none | Filter by phone number. |
FriendlyName | string | No | none | Filter by friendly name. |
Output: incoming_phone_numbers[] (each with sid, phone_number, friendly_name, sms_url, voice_url, capabilities).
twilio/lookup-phone-number looks up information about a phone number using the Twilio Lookup v2 API.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
phoneNumber | string | Yes | none | Number to look up, in E.164 format. |
Fields | string | No | none | Comma-separated data packages, for example line_type_intelligence,caller_name. |
Output: phone_number, country_code, national_format, valid (boolean), calling_country_code, caller_name (object or null), line_type_intelligence (object or null).
twilio/configure-phone-number-webhooks updates webhook URLs for an incoming phone number.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
phoneNumberSid | string | Yes | none | Phone Number SID (starts with PN). |
SmsUrl | string | No | none | SMS webhook URL. |
SmsMethod | enum | No | none | GET or POST. |
VoiceUrl | string | No | none | Voice webhook URL. |
VoiceMethod | enum | No | none | GET or POST. |
StatusCallback | string | No | none | Status callback URL. |
StatusCallbackMethod | enum | No | none | GET or POST. |
Output: sid, phone_number, friendly_name, sms_url, voice_url, status_callback.
Verify
twilio/start-verification sends a verification code through Twilio Verify.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
serviceSid | dropdown | Yes | none | Verify Service, picked from your account's services. |
To | string | Yes | none | Phone number or email to verify. |
Channel | enum | Yes | none | One of sms, call, email, whatsapp. |
Output: sid, status, to, channel, valid (boolean), date_created.
twilio/check-verification checks a verification code submitted by the user.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
serviceSid | dropdown | Yes | none | Verify Service, picked from your account's services. |
To | string | Yes | none | Phone number or email that was verified. |
Code | string | Yes | none | The code the user entered. |
Output: sid, status, to, channel, valid (boolean), date_created.
Errors
When a Twilio call fails, TaskJuice maps the provider's HTTP status to a stable error code so your workflow can branch on it. Any response that does not map to a specific code surfaces as the generic UPSTREAM_REQUEST_FAILED.
| HTTP status | Error code | Retryable | What to do |
|---|---|---|---|
| 400 | VALIDATION_ERROR | No | Fix the request, for example a malformed E.164 number or a body over 1600 characters. |
| 401 | AUTH_EXPIRED | No | Reconnect the Twilio account; the Account SID or Auth Token is invalid or rotated. |
| 404 | NOT_FOUND | No | Confirm the SID exists, for example the Message, Call, or Phone Number SID. |
| 429 | RATE_LIMITED | Yes | Twilio is throttling. TaskJuice retries with backoff. |
| 500 | PROVIDER_ERROR | Yes | Twilio had a server error. TaskJuice retries. |
Known limitations
- Twilio connects with API-key credentials, not OAuth. There is no Connect-and-authorize redirect; you paste your Account SID and Auth Token. Every REST call authenticates with HTTP Basic, using the Account SID as the username and the Auth Token as the password.
- Inbound verification relies on the Twilio request signature. Incoming SMS and Incoming Call triggers verify the
X-Twilio-Signatureheader before activating, using your Auth Token. Because the Auth Token is also the signing key, rotating it in the Twilio Console means you must update the TaskJuice connection promptly, or inbound webhooks will fail verification. - Every Twilio trigger and action is in beta.
- Send SMS accepts up to 1600 characters in
Body. Split longer content across multiple sends. - Phone numbers for SMS, MMS, and voice must be in E.164 format, for example
+15551234567. WhatsApp uses thewhatsapp:+...prefixed form for both To and From. - Send WhatsApp Message does not use the phone-number dropdown. You type the
whatsapp:+...sender yourself, and it must be a WhatsApp-enabled Twilio sender. - List Messages and List Recordings return one page per call. Each pages at up to 1000 results (default 50) and returns a
next_page_urifor the following page. - There is no bulk-send action. To message many recipients, drive Send SMS from a Loop node over your recipient list.
- The geo fields on both triggers (
FromCity,FromState,FromCountry, and theirToequivalents) appear only when Twilio has location data for the number. Treat them as optional.