step

twilio

Send SMS messages, MMS, and perform phone lookups using Twilio's communication platform.

Overview

Send SMS messages, MMS, and perform phone lookups using Twilio's communication platform.

This step enables sending text messages, multimedia messages, and validating phone numbers through Twilio's API. You can send notifications, alerts, verification codes, marketing messages, and more. The connector supports template substitution for dynamic content, handles multiple recipients through iteration, and provides delivery status tracking. Perfect for customer notifications, two-factor authentication, order updates, and any workflow requiring SMS/phone communication.

Setup: 1. Create a Twilio account at https://www.twilio.com/try-twilio 2. Get your Account SID and Auth Token from the Console Dashboard (https://console.twilio.com/) 3. Purchase a Twilio phone number for SMS/voice (https://console.twilio.com/us1/develop/phone-numbers) 4. Store your credentials securely (e.g., environment variables: TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)

Credentials: Required. Get your Account SID and Auth Token from https://console.twilio.com/

Examples

Send SMS notification

Send a simple SMS message

type: twilio
account_sid: ${env:TWILIO_ACCOUNT_SID}
auth_token: ${env:TWILIO_AUTH_TOKEN}
operation: send_sms
from: +14155551234
to: ${user.phone}
body: "Your verification code is: ${code}"
output_to: sms_result

Send order confirmation

Send SMS with order details

type: twilio
account_sid: ${env:TWILIO_ACCOUNT_SID}
auth_token: ${env:TWILIO_AUTH_TOKEN}
operation: send_sms
from: ${env:TWILIO_PHONE_NUMBER}
to: ${customer.phone}
body: "Hi ${customer.name}! Your order #${order.id} has been confirmed. Total: $${order.total}"
output_to: confirmation_sms

Send MMS with image

Send multimedia message with an image

type: twilio
account_sid: ${env:TWILIO_ACCOUNT_SID}
auth_token: ${env:TWILIO_AUTH_TOKEN}
operation: send_mms
from: +14155551234
to: ${user.phone}
body: "Check out this great offer!"
media_url:
  - https://example.com/offer.jpg
output_to: mms_result

Validate phone number

Lookup and validate a phone number

type: twilio
account_sid: ${env:TWILIO_ACCOUNT_SID}
auth_token: ${env:TWILIO_AUTH_TOKEN}
operation: lookup
phone_number: ${user.phone}
output_to: phone_info

Check message status

Retrieve message delivery status

type: twilio
account_sid: ${env:TWILIO_ACCOUNT_SID}
auth_token: ${env:TWILIO_AUTH_TOKEN}
operation: get_message
message_sid: ${sms_result.sid}
output_to: message_status

Configuration

Parameter Type Required Description
account_sid string Yes Twilio Account SID (starts with AC). Use environment variables to keep this secure.
auth_token string Yes Twilio Auth Token. Use environment variables to keep this secure.
operation string No Operation to perform: 'send_sms', 'send_mms', 'lookup', 'get_message'
Default: "send_sms"
from string No From phone number (E.164 format: +1234567890). Required for send_sms/send_mms.
to string No To phone number (E.164 format: +1234567890). Required for send_sms/send_mms.
body string No Message body text (up to 1600 characters). Required for send_sms/send_mms.
media_url string No List of media URLs for MMS (images, videos, PDFs). Up to 10 URLs.
phone_number string No Phone number to lookup (E.164 format). Required for lookup operation.
message_sid string No Message SID to retrieve (starts with MM or SM). Required for get_message operation.
status_callback string No Webhook URL to receive message status updates.
output_to string No Event key where the Twilio response will be stored.
Default: "twilio"
timeout integer No Request timeout in seconds.
Default: 30

Base Configuration

These configuration options are available on all steps:

Parameter Type Default Description
name null Optional name for this step (for documentation and debugging)
description null Optional description of what this step does
retries integer 0 Number of retry attempts (0-10)
backoff_seconds number 0 Backoff (seconds) applied between retry attempts
retry_propagate boolean false If True, raise last exception after exhausting retries; otherwise swallow.