Skip to content
© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Twilio SMS

Use this node to send SMS messages via the Twilio messaging service — for example, alerting a field technician’s mobile when a device alarm is raised, or sending an automated status update to a manager’s phone number stored in device metadata.

  • Number From — required. Twilio sender phone number in E.164 format (e.g., +19995550123). Supports templatization.
  • Numbers To — required. Comma-separated recipient phone numbers. Supports templatization.
  • Account SID — required. Twilio account identifier.
  • Account Token — required. Twilio authentication token.

The message content is taken from the incoming message data (outer quotes and \n escape sequences are handled automatically).

  1. Resolve sender and recipient phone numbers from the configuration templates.
  2. Send an SMS to each resolved recipient using the Twilio API with the incoming message data as the body.
  3. Route via Success on delivery. Message data and metadata are not modified.
  4. Route via Failure on unexpected error.
Connection Condition
Success SMS sent to all recipients successfully.
Failure Invalid credentials, Twilio API error, or unexpected error.

Example 1 — Send alert SMS from metadata phone

Section titled “Example 1 — Send alert SMS from metadata phone”

Data: "High temperature detected: 85°C" | Metadata: { "techPhone": "+15551234567" }.

{
"numberFrom": "+19995550123",
"numbersTo": "${techPhone}",
"accountSid": "ACxxxxxxxx",
"accountToken": "your_token"
}

Result: SMS "High temperature detected: 85°C" sent to +15551234567. Routes via Success.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbTwilioSmsNodeConfiguration",
"type": "object",
"required": ["numberFrom", "numbersTo", "accountSid", "accountToken"],
"additionalProperties": false,
"properties": {
"numberFrom": { "type": "string" },
"numbersTo": { "type": "string" },
"accountSid": { "type": "string" },
"accountToken": { "type": "string" }
}
}