Skip to main content

Twilio

Connects to the Twilio REST API for sending and reviewing SMS and WhatsApp messages.

Add to an agent node's tools array with _node_type: "tool-twilio". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
account_sidYesTwilio Account SID, used for HTTP Basic auth.
auth_tokenYesTwilio Auth Token, used for HTTP Basic auth.
from_numberNoDefault sender phone number (E.164 format). Used by twilio_send_sms if no from parameter is given, and required by twilio_send_whatsapp.
{
"name": "twilio",
"_node_type": "tool-twilio",
"account_sid": "{{ secret.TWILIO_ACCOUNT_SID }}",
"auth_token": "{{ secret.TWILIO_AUTH_TOKEN }}",
"from_number": "+14155550100"
}

Tools

twilio_send_sms

Send an SMS message using Twilio.

Parameters

ParameterTypeRequiredDescription
tostringYesRecipient phone number in E.164 format (e.g. +14155552671)
bodystringYesSMS message content
fromstringNoSender phone number (uses credentials.from_number if not set)

Returns: A confirmation message with the message SID and delivery status. Returns an error if no sender number is configured via from or credentials.from_number.

twilio_send_whatsapp

Send a WhatsApp message using Twilio's WhatsApp Business API.

Parameters

ParameterTypeRequiredDescription
tostringYesRecipient WhatsApp number in E.164 format (e.g. +14155552671)
bodystringYesMessage content

Returns: A confirmation message with the message SID and delivery status. Requires credentials.from_number to be set; the connector prefixes both numbers with whatsapp:.

twilio_list_messages

List SMS/WhatsApp messages from Twilio account.

Parameters

ParameterTypeRequiredDescription
limitnumberNoMax messages to return (default 20)
tostringNoFilter by recipient number
fromstringNoFilter by sender number

Returns: A newline-separated list of - [<status>] <from> → <to>: <body> (sid: <sid>) lines, or "No messages found.".

twilio_get_message

Get details of a specific Twilio message.

Parameters

ParameterTypeRequiredDescription
message_sidstringYesTwilio message SID

Returns: A formatted string with sender, recipient, status, sent date, and message body.

Next