Sends voice messages to specified phone numbers via Twilio voice service using text-to-speech technology.
Configuration
Phone settings
- Phone Number From – The Twilio phone number to call 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 voice call. This field supports templatization.
Account settings
- Twilio Account SID – Your Twilio account identifier.
- Twilio Account Token – Your Twilio authentication token.
Voice settings
- Voice provider – The text-to-speech voice provider to use.
- Language – The language for the voice message. Corresponds to Twilio’s supported languages.
- Voice – The voice type to use.
Audio output settings
- Pitch – The pitch adjustment for the voice in percentage (default:
100). Higher values produce a higher-pitched voice, lower values produce a lower-pitched voice. - Rate – The speaking rate in percentage (default:
100). Higher values speed up the speech, lower values slow it down. - Volume – The volume adjustment in decibels (default:
0). Positive values increase volume, negative values decrease it. - Pause before talking – Duration in seconds to pause before the voice message begins playing.
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 voice call 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 voice call operation. The message is passed to the next node after the voice call operation completes.
Message processing algorithm
- The node processes the phone number from template to extract the caller 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 voice message content is taken directly from the incoming message data. Leading and trailing quotes are removed from the data.
- A voice response is constructed using Twilio’s TwiML with:
- A pause of the specified duration before speaking
- Text-to-speech configuration with the specified language, voice, pitch, rate, and volume settings
- The voice call is initiated asynchronously via Twilio to each specified phone number.
- When processing completes:
- Success: The message is routed to the
Successconnection after all voice calls are initiated successfully. - Failure: If any voice call fails to initiate, the message is routed to the
Failureconnection.
- Success: The message is routed to the
Output connections
- Success
- The voice call was successfully initiated to all specified phone numbers.
- Failure
- An unexpected error occurred during voice call initiation, such as invalid phone numbers or Twilio API errors.
Examples
Example 1 — Sending alarm notification
Send a voice alert when a device triggers an alarm.
Incoming message
Data:
1
"Attention. Device Temperature Sensor 01 has triggered a 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
7
8
9
10
11
12
{
"numberFrom": "${twilioNumber}",
"numbersTo": "${userPhone}",
"accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"accountToken": "your_auth_token_here",
"language": "EN_US",
"voice": "WOMAN",
"pitch": 100,
"rate": 100,
"volume": 0,
"startPause": 1
}
Outgoing message
Data: unchanged.
Metadata: unchanged.
Routed via the Success connection.
Result
A voice call is initiated from +15559876543 to +15551234567. After a 1-second pause, the recipient hears:
1
Attention. Device Temperature Sensor 01 has triggered a high temperature alarm.