Docs / Strand / connectors/twilio

Twilio Connector

Send SMS and MMS messages via the Twilio API from your Strand workflows.

Prerequisites

You need a Twilio account with messaging capabilities:

  1. Sign up at twilio.com and verify your account
  2. From the Twilio Console, note your:
  1. Get a phone number:
Tip: Use a Messaging Service for production workloads. It handles sender selection, compliance, and scaling automatically.

Required Permissions

Your Twilio account must have:

Requirement Description
Active account Twilio account must be active (not suspended)
Messaging capability The sending phone number or Messaging Service must support SMS
Verified recipients (trial) Trial accounts can only send to verified phone numbers

Connector Setup

Create a Twilio connector from the Connectors page.

Configuration Fields

Field Required Description
Name Yes Friendly name (e.g., "Production Twilio")
Account SID Yes Twilio Account SID (starts with AC)
Auth Token Yes Twilio Auth Token (encrypted at rest)
From Phone No* Default sender phone number in E.164 format (e.g., +15551234567)
Messaging Service SID No* Twilio Messaging Service SID (starts with MG)
Timeout No Request timeout in seconds (default: 30)
Description No Optional description for reference
*Either From Phone or Messaging Service SID must be configured. If both are provided, both are sent to Twilio (Messaging Service takes precedence).

Operations

Send SMS

Send an SMS or MMS message to a phone number.

Field Required Description
To Yes Recipient phone number in E.164 format (e.g., +15559876543)
Body Yes Message text (supports Jinja2 templating)
Media URL No URL of media to attach (sends as MMS)

Example: Send an order confirmation:

Example: Send an MMS with image:

Output

json

{
  "success": true,
  "status": "queued",
  "to": "+15559876543",
  "from": "+15551234567",
  "body": "Your order #ORD-123 has been confirmed.",
  "data": {
    "sid": "SM1234567890abcdef1234567890abcdef",
    "status": "queued",
    "date_created": "Thu, 12 Mar 2026 14:30:00 +0000",
    "price": null,
    "num_segments": "1"
  }
}

Key fields for subsequent nodes:

Errors

Error Meaning
account_sid is missing from connector configuration Account SID not configured in connector.
auth_token is missing from connector configuration Auth Token not configured in connector.
'to' phone number is required No recipient phone number specified in the node.
Message 'body' is required No message body provided.
Either 'from_phone' or 'messaging_service_sid' must be configured Neither a sender number nor Messaging Service is set on the connector.
Twilio API error (HTTP 401) Invalid Account SID or Auth Token.
Twilio API error (HTTP 21211) Invalid "To" phone number.
Twilio API error (HTTP 21608) The "From" number is not a valid Twilio number.
Twilio API request timed out Request exceeded the configured timeout. Check network connectivity.
Failed to connect to Twilio API Network error reaching Twilio. Check connectivity.

Example Workflow

  1. Create Connector with your Account SID, Auth Token, and From Phone number
  2. Trigger on a new order event
  3. Send SMS to the customer:
  1. Logic node to check order value, then conditionally:

Limitations