Sends SMS messages to specified phone numbers via Twilio messaging service.
Configuration
- Phone Number From – The Twilio phone number or Messaging Service SID to send from. Must be in E.164 format (e.g.,
+19995550123). This field supports templatization. - Phone Numbers To – A comma-separated list of phone numbers that will receive the SMS message. This field supports templatization.
- Twilio Account SID – Your Twilio account identifier.
- Twilio Account Token – Your Twilio authentication token.
JSON Schema
Output message format
The node does not modify the incoming message. Both message data and metadata are passed through unchanged to the next node in the chain.
Message acknowledgement behavior
The node’s message acknowledgement behavior is controlled by the ACTORS_RULE_EXTERNAL_NODE_FORCE_ACK environment variable:
- When set to
true– The incoming message is acknowledged and marked as successfully processed immediately upon receipt. A new message is created as a copy. The SMS sending operation proceeds asynchronously, and after completion, the copy is enqueued for processing by the next node. - When set to
false(default) – The incoming message remains in an in-processing state throughout the entire SMS sending operation. The message is passed to the next node after the SMS operation completes.
Message processing algorithm
- The node processes the phone number from template to extract the sender phone number from the incoming message data and metadata.
- The node processes the phone numbers to template to extract target phone numbers from the incoming message data and metadata.
- The SMS message content is taken directly from the incoming message data payload. Leading and trailing quotes are removed, and escaped newline characters (
\n) are converted to actual newlines. - The SMS is sent asynchronously via Twilio to each specified phone number.
- When processing completes:
- Success: The message is routed to the
Successconnection after all SMS messages are sent successfully. - Failure: If any SMS fails to send, the message is routed to the
Failureconnection.
- Success: The message is routed to the
Output connections
- Success
- The SMS was successfully sent to all specified phone numbers.
- Failure
- An unexpected error occurred during SMS sending.
Examples
Example 1 — Sending alarm notification
Send an SMS alert when a device triggers an alarm.
Incoming message
Data:
1
"Device Temperature Sensor 01 has triggered HIGH_TEMPERATURE alarm"
Metadata:
1
2
3
4
5
6
{
"deviceName": "Temperature Sensor 01",
"alarmType": "HIGH_TEMPERATURE",
"userPhone": "+15551234567",
"twilioNumber": "+15559876543"
}
Node configuration
1
2
3
4
5
6
{
"numberFrom": "${twilioNumber}",
"numbersTo": "${userPhone}",
"accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"accountToken": "your_auth_token_here"
}
Outgoing message
Data: unchanged.
Metadata: unchanged.
Routed via the Success connection.
Result
An SMS message is sent from +15559876543 to +15551234567:
1
Device Temperature Sensor 01 has triggered HIGH_TEMPERATURE alarm
Example 2 — Multiple recipients
Send an SMS notification to multiple phone numbers.
Incoming message
Data:
1
"Critical: Water leak detected in Warehouse A"
Metadata:
1
2
3
4
{
"emergencyContacts": "+15551234567,+15559876543,+15555555555",
"companyPhone": "+15551111111"
}
Node configuration
1
2
3
4
5
6
{
"numberFrom": "${companyPhone}",
"numbersTo": "${emergencyContacts}",
"accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"accountToken": "your_auth_token_here"
}
Outgoing message
Data: unchanged.
Metadata: unchanged.
Routed via the Success connection.
Result
An SMS message is sent from +15551111111 to three recipients (+15551234567, +15559876543, and +15555555555):
1
Critical: Water leak detected in Warehouse A