# Twilio SMS

<!-- meta: type=twilio-sms; location=Messaging › Mobile; category=Step (action); platforms=Joomla and WordPress (where applicable) -->

## Overview

Sends an SMS text message through your Twilio account when the flow reaches this step. Ideal for OTP codes, order updates, and alerts when email is too slow or unread.

When the flow reaches this step, JOrchestrator executes **Twilio SMS** against your linked site or an external integration, using the field values you set on **General** and **Design**. Downstream steps can read the output payload fields defined for this node.

## Why use this node

Twilio SMS is a **action step** in the **Messaging › Mobile** group. Action steps run in the middle or end of a flow. They perform work on your CMS, call external services, or transform data for the next step.

Typical reasons teams add **Twilio SMS** to a flow:

- Send OTP or two-factor codes when a user completes a webhook form
- Text order-shipped or appointment reminders using payload fields from CMS or Stripe
- Alert on-call staff when a monitoring webhook fires
- Reach users who rarely read email but respond to SMS

## Example workflows

Common patterns on the canvas:

1. **Trigger or Webhook** → upstream steps → **Twilio SMS** → **Send Email** or CMS update
2. **Scheduled trigger** → **Twilio SMS** → **Debug** (while testing) → production action

## How to set it up

Credentials and default From number from Node Configuration → Twilio. **To** and **Body** are required on Design; **From** can override the default.

## Good to know

Use E.164 phone format (+country code) to reduce delivery failures. Twilio must be able to reach your configured From number.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **General** | Canvas label and read-only node ID |
| **AI** | Optional assistant to help draft settings from plain language |
| **Design** | Node-specific configuration fields |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_payloadFields` | Available Fields | `payload-panel` | No | — | — |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `to` | To | `payload-text` | **Yes** | — | +15551234567 |
| `from` | From (optional) | `payload-text` | No | — | Uses default from Joomla Node Configuration → Twilio if empty |
| `body` | Message | `textarea` | **Yes** | — | SMS text or {{node_id.field}} |
| `statusCallback` | Status callback URL (optional) | `payload-text` | No | — | https://example.com/twilio/status |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{twilio_sms.success}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `success` | boolean | Whether the operation completed successfully. |
| `sid` | string | Twilio message SID. |
| `status` | string | HTTP status code or operation status string. |
| `to` | string | Recipient address or user. |
| `from` | string | Sender address or number. |
| `body` | string | Raw content — response text, file bytes (often base64), or message body. |
| `numMedia` | string | Number of media attachments (MMS). |
| `message` | string | Human-readable status, error, or result summary. |

## Validation rules

- **To** (`to`) must be filled before the flow can be saved.
- **Message** (`body`) must be filled before the flow can be saved.

## Related nodes

Other steps in the same area of the palette:

- **Discord Message** (`discord-message`) — Messaging › Social
- **Send Email** (`send-email`) — Messaging › Email
- **Send Notification** (`send-notification`) — Messaging › Notifications
- **Slack Message** (`slack-message`) — Messaging › Social
- **Twilio MMS** (`twilio-mms`) — Messaging › Mobile
