<!-- BusyBot node reference — https://busybot.net/tools/twilio/ -->

> Node: Twilio (`twilio`) · Action · v1
> Category: Communication · Credentials: Twilio (`twilioApi`)
> Updated: 2026-08-16

# 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

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Twilio** credentials.
See the [Credentials Guide](https://busybot.net/credentials/twilio-api/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| SMS | `sms` |
| Call | `call` |

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Send | `send` | Send an SMS/MMS/WhatsApp message |
| Make | `make` | Make a phone call |

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

### Parameters

#### SMS: Send

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| From | `string` | Yes | — | The Twilio phone number to send from, in E.164 format (e.g. +14155238886). Supports expressions. |
| To | `string` | Yes | — | The recipient phone number in E.164 format (e.g. +14155238886). Supports expressions. |
| To WhatsApp | `boolean` | No | `false` | Whether to send the message via WhatsApp. Prefixes both From and To numbers with "whatsapp:". |
| Message | `string` | Yes | — | The message body to send. Supports expressions like {{ $json.body }}. |
| Media URL(s) | `string` | No | — | Optional media URL(s) for MMS. Provide a single URL, a comma-separated list, or an array via expression. |

#### Call: Make

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| From | `string` | Yes | — | The Twilio phone number to send from, in E.164 format (e.g. +14155238886). Supports expressions. |
| To | `string` | Yes | — | The recipient phone number in E.164 format (e.g. +14155238886). Supports expressions. |
| Use TwiML | `boolean` | No | `false` | Whether to treat the message as raw TwiML. When false, the message is automatically wrapped in <Response><Say>...</Say></Response>. |
| Message | `string` | Yes | — | The text to speak on the call, or raw TwiML if "Use TwiML" is enabled. Supports expressions. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Options | `collection` | No | `{}` | Additional Twilio API options. |
| — Status Callback | `string` | No | — | A 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 Concurrency | `number` | No | `10` | Maximum 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:

```json
{
  "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:

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

Track delivery with a status callback:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes 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.