Twilio
Configure Twilio as an SMS provider in Notiflows
Twilio is a global SMS delivery platform with carrier-grade reliability.
Prerequisites
Before configuring Twilio in Notiflows, you need:
- A Twilio account
- Your Account SID and Auth Token
- A phone number, messaging service, or short code to send from
Configuration
| Field | Required | Description |
|---|---|---|
| Account SID | Yes | Your Twilio Account SID |
| Auth Token | Yes | Your Twilio Auth Token |
| From Type | Yes | How to identify the sender: Phone Number, Messaging Service SID, or Short Code |
| Phone Number | Conditional | Sender phone number in E.164 format (e.g., +15551234567) |
| Messaging Service SID | Conditional | Twilio Messaging Service identifier |
| Short Code | Conditional | Your registered short code |
You must provide one of Phone Number, Messaging Service SID, or Short Code based on your selected From Type.
Step 1: Find your Account SID and Auth Token
- Log in to the Twilio Console
- On the dashboard, locate the Account Info section
- Your Account SID is displayed directly — copy it
- Your Auth Token is hidden by default — click Show to reveal it, then copy it
Your Auth Token is effectively your account password. Never share it, commit it to version control, or expose it in client-side code.
Step 2: Set up a sender
You need something to send SMS from. Choose one of the three options below.
Option A: Buy a phone number (simplest)
- In the Twilio Console, click Phone Numbers > Manage > Buy a number in the left navigation
- Select your country and search for available numbers
- Ensure the number has SMS capability (check the SMS column)
- Click Buy and confirm the purchase
- Copy the phone number in E.164 format (e.g.,
+15551234567)
Option B: Create a messaging service
Messaging services let you manage a pool of sender phone numbers with automatic load balancing and failover. Recommended if you send high volumes or need multiple sender numbers.
- In the Twilio Console, click Messaging > Services in the left navigation
- Click Create Messaging Service
- Enter a name (e.g.,
Notiflows Notifications) - Select the use case that best describes your traffic
- Click Create Messaging Service
- In the Sender Pool step, click Add Senders and add one or more phone numbers
- Complete the setup and copy the Messaging Service SID (starts with
MG)
Option C: Use a short code
If you have a registered short code, you can use it directly. Short codes are provisioned through Twilio's sales team and are typically used for high-volume marketing or two-factor authentication.
Step 3: Set up in Notiflows
- Navigate to Channels in your project
- Click Create Channel
- Select SMS as the channel type
- Select Twilio as the provider
- Enter your Account SID and Auth Token
- Select your From Type and enter the corresponding value:
- Phone Number — enter the number in E.164 format
- Messaging Service SID — enter the SID starting with
MG - Short Code — enter your short code
- Save the channel
Recipient phone numbers
Notiflows sends SMS to the phone number stored on the recipient user. Phone numbers must be in E.164 format:
+15551234567 (US)
+447911123456 (UK)
+61412345678 (Australia)Set the phone number on a user via the Admin API:
curl -X PUT https://api.notiflows.com/api/admin/v1/users/USER_ID \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+15551234567"
}'Templates
SMS templates use plaintext only.
Use Liquid templating for dynamic content:
Hi {{ recipient.first_name }}, your order #{{ data.order_id }} has shipped!Available variable contexts:
recipient.*- Recipient user data (first_name, last_name, phone_number, etc.)actor.*- User who triggered the notificationdata.*- Custom payload passed when triggering the notiflow