Reference · Tools

Twilio

Send SMS, MMS, and WhatsApp messages or make outbound phone calls via the Twilio API.

Action Communication v1

The Twilio node sends SMS, MMS and WhatsApp messages and places outbound phone calls through the REST API. A typical build is sending a verification code by SMS, or calling an on-call engineer when an alert goes unacknowledged.

Node type
Action
Parameters
12
Outputs
Output, Error
Credentials
Twilio

Twilio

Send SMS/MMS/WhatsApp messages and make phone calls via Twilio.

Overview

Twilio is a cloud communications platform. This tool supports sending SMS/MMS/WhatsApp messages and making outbound phone calls using the Twilio REST API. Messages are sent via POST to the Messages endpoint; calls are initiated via POST to the Calls endpoint with TwiML instructions. Supports both auth-token and API-key authentication modes.

Category: Communication
Tool Name: twilio
Version: 1

Appearance: Icon: lucide-Phone | Color: #F22F46

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Twilio credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
SMSsms
Callcall

Operations

OperationValueDescription
SendsendSend an SMS/MMS/WhatsApp message
MakemakeMake a phone call

send is offered when Resource is sms; make is offered when Resource is call.

Parameters

SMS: Send

ParameterTypeRequiredDefaultDescription
FromstringYesThe Twilio phone number to send from, in E.164 format (e.g. +14155238886). Supports expressions.
TostringYesThe recipient phone number in E.164 format (e.g. +14155238886). Supports expressions.
To WhatsAppbooleanNofalseWhether to send the message via WhatsApp. Prefixes both From and To numbers with “whatsapp:”.
MessagestringYesThe message body to send. Supports expressions like {{ $json.body }}.
Media URL(s)stringNoOptional media URL(s) for MMS. Provide a single URL, a comma-separated list, or an array via expression.

Call: Make

ParameterTypeRequiredDefaultDescription
FromstringYesThe Twilio phone number to send from, in E.164 format (e.g. +14155238886). Supports expressions.
TostringYesThe recipient phone number in E.164 format (e.g. +14155238886). Supports expressions.
Use TwiMLbooleanNofalseWhether to treat the message as raw TwiML. When false, the message is automatically wrapped in .
MessagestringYesThe text to speak on the call, or raw TwiML if “Use TwiML” is enabled. Supports expressions.

All Operations

ParameterTypeRequiredDefaultDescription
OptionscollectionNo{}Additional Twilio API options.
— Status CallbackstringNoA URL that Twilio will send status update webhooks to (e.g. queued, sent, delivered, failed for SMS; ringing, answered, completed for calls). Supports expressions.
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

One output item per input item — neither operation fans out. The Twilio API response is merged onto the top level of the item JSON: for SMS: Send the created message resource (message SID, status and metadata), for Call: Make the created call resource (call SID, status and metadata). Anything already on the item passes through, and binary data is forwarded unchanged.

Both phone numbers are validated as E.164 (+ followed by the country code and number) before the request is sent; a badly formatted number fails the item without calling Twilio. A whatsapp: prefix is accepted and ignored during validation.

Usage Examples

  • Send an SMS notification to a customer after their order ships
  • Send a WhatsApp message with order confirmation details
  • Make an automated phone call to deliver a voice alert
  • Send a bulk SMS campaign to a list of phone numbers
  • Trigger a voice call with custom TwiML instructions

Example Configuration

Send a basic SMS message:

{
  "type": "twilio",
  "parameters": {
    "resource": "sms",
    "operation": "send",
    "from": "+14155238886",
    "to": "+14155551234",
    "message": "Hello, this is a test message from Twilio!"
  }
}

Send the same message over WhatsApp:

{
  "type": "twilio",
  "parameters": {
    "resource": "sms",
    "operation": "send",
    "from": "+14155238886",
    "to": "+14155551234",
    "message": "Hello via WhatsApp!",
    "toWhatsapp": true
  }
}

Track delivery with a status callback:

{
  "type": "twilio",
  "parameters": {
    "resource": "sms",
    "operation": "send",
    "from": "+14155238886",
    "to": "+14155551234",
    "message": "Message with webhook tracking",
    "options": {
      "statusCallback": "https://myapp.com/sms-status-webhook"
    }
  }
}

Attach an image to send it as MMS:

{
  "type": "twilio",
  "parameters": {
    "resource": "sms",
    "operation": "send",
    "from": "+14155238886",
    "to": "{{ $json.phone }}",
    "message": "Here is your receipt.",
    "mediaUrl": "{{ $json.receiptImageUrl }}"
  }
}

Place a call that reads a message aloud:

{
  "type": "twilio",
  "parameters": {
    "resource": "call",
    "operation": "make",
    "from": "+14155238886",
    "to": "+14155551234",
    "message": "Hello, this is an automated call from our system.",
    "twiml": false
  }
}

Place a call driven by raw TwiML:

{
  "type": "twilio",
  "parameters": {
    "resource": "call",
    "operation": "make",
    "from": "+14155238886",
    "to": "+14155551234",
    "message": "<Response><Say voice='alice'>Hello! Please hold while we connect you.</Say><Pause length='2'/><Play>http://example.com/hold-music.mp3</Play></Response>",
    "twiml": true
  }
}

Notify a customer about a shipment, one message per item, with concurrency held down:

{
  "type": "twilio",
  "parameters": {
    "resource": "sms",
    "operation": "send",
    "from": "+14155238886",
    "to": "{{ $json.customerPhone }}",
    "message": "Your order {{ $json.orderId }} has been shipped and will arrive tomorrow.",
    "maxConcurrency": 5,
    "options": {
      "statusCallback": "https://api.mystore.com/twilio/sms-status"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Twilio sends SMS/MMS/WhatsApp messages and makes outbound phone calls via the Twilio REST API. Use it to notify users, send verification codes, or initiate automated voice calls.

Parameter Relationship Summary

  • resource determines which operation is available
  • operation becomes available once resource is set
  • from and to are required for both operations
  • SMS-specific parameters (toWhatsapp, mediaUrl, the SMS message) only appear when resource = “sms”
  • Call-specific parameters (twiml, the call message) only appear when resource = “call”
  • The options collection is available for all operations and provides additional Twilio API features
  • maxConcurrency controls parallel processing for bulk operations

Rate Limits

Twilio answers a burst that exceeds your account’s limits with HTTP 429. The node retries such a response up to three times, honouring the Retry-After header when Twilio sends one and backing off exponentially when it does not. On a trial account, sending to an unverified recipient fails with a message pointing you at the Twilio console’s verified-numbers page.

Frequently asked questions

How do I send a WhatsApp message rather than an SMS?

Through the WhatsApp option on the SMS resource, since Twilio routes WhatsApp over the same messaging API with a different addressing scheme.

What is always required?

From and To, for both messaging and calls — the sending number must be one Twilio has issued to your account.

Why can I not select an operation?

Operation becomes available once Resource is set, because the resource determines which operations exist.

How do I react to inbound messages or calls?

Use the Twilio Trigger, which listens for inbound SMS and completed call summaries via Event Streams.

Build with the Twilio node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Twilio credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.