# Schedule SMS text messages with Twilio

Send text messages on a schedule through your [Twilio](https://www.twilio.com) account: reminders, daily alerts, and one-time texts at an exact time in any time zone.

## Example: a one-time appointment reminder

```json
{
  "name": "Reminder: Ada, Tue 10:00",
  "run_at": "2026-11-09T18:00:00-05:00",
  "nodes": [
    { "id": "sms", "twilio_send_sms": {
        "credential_id": "YOUR_TWILIO_ACCOUNT_ID",
        "to": "+15551234567",
        "from": "+15557654321",
        "body": "Hi Ada, a reminder of your appointment tomorrow at 10:00 with Dr. Lee. Reply C to cancel." } }
  ]
}
```

Create one job per reminder from your booking system with `POST /alarms`. Each fires once and switches itself off.

## Example: text the on-call engineer

```json
{
  "name": "Text today's on-call",
  "cron": { "expression": "0 8 * * *", "time_zone": "America/Denver" },
  "nodes": [
    { "id": "oncall", "pagerduty_list_on_calls": { "credential_id": "YOUR_PAGERDUTY_API_KEY_ID", "escalation_policy": "PABC123", "limit": 1 } },
    { "id": "sms", "twilio_send_sms": {
        "credential_id": "YOUR_TWILIO_ACCOUNT_ID",
        "to": "+15551234567",
        "from": "MG0123456789abcdef0123456789abcdef",
        "body": "You're on call today ({{ $.oncalls[0].schedule.summary }})." } }
  ]
}
```

## Set up

Save your account SID and auth token as a `twilio` credential. `from` is one of your Twilio numbers or a messaging service SID. US numbers need an approved A2P 10DLC registration before carriers deliver your texts.

## Reference

### Send an SMS with Twilio: `twilio_send_sms`

**Sends** POST `https://api.twilio.com/2010-04-01/Accounts/<sid>/Messages.json` with HTTP Basic auth. **Output** for the next step: The created message, with its `sid` and `status`.

| Field | Type | Notes |
| --- | --- | --- |
| `credential_id` | string, required | The id of a `twilio` credential holding your account SID and auth token. |
| `to` | string, required | An E.164 number such as `+15551234567`, or a placeholder. Placeholders allowed. |
| `from` | string, required | One of your Twilio numbers in E.164, or a messaging service SID (`MG…`). Placeholders allowed. |
| `body` | string, required | Up to 1,600 characters. Longer texts are sent as several segments. Placeholders allowed. |

## More ideas

- A daily low-stock alert from your store's API.
- A "doors open" text at an exact time for an event, with `run_at`.
- A weekly reminder to a volunteer rota: `0 17 * * SUN`.
