Twilio · Send an SMS — Sends a text message from a Twilio number — sends a text to a mobile number through your own Twilio account. Twilio bills the account for each message.
Who can do this
Workspace Admins and Editors, on every plan. Viewers see the step's settings but cannot change them.
Before you start
- A Twilio connection in this workspace — see Connect Twilio.
- A Twilio number that can send SMS, or a messaging service.
- On a trial account, the number you send to verified in Twilio.
Steps
- Select + where the text should be sent. In the step picker, open Apps, select Twilio, then Send an SMS. Or search Twilio.
- In Connection, choose your Twilio connection. If it is the only one, it is already chosen.
- In From, choose a number or a messaging service — The account's numbers and messaging services. The list reads Loading your numbers… first; messaging services show Messaging service beside them.
- In To, the number to send to — In international form, with the + and country code. For example +91 98765 43210 is written +919876543210 (an example number). Or drag in a number from an earlier step.
- In Message, type the text. Use
{{ }}for values from earlier steps. - Optional: in Media address, an
httpsaddress of a picture — Optional — an https address of a picture to send as MMS. - Select Run this step to send a test.
Output
| Field | What it is |
|---|---|
id |
Twilio's id for the message — it starts with SM or MM. Check its delivery later with Get a Twilio message. |
status |
Where Twilio has got to — usually queued, or accepted from a messaging service. |
from, to |
The numbers it went from and to. |
body |
The text as Twilio took it. |
price, priceUnit |
The price, once Twilio knows it — usually empty at this point. |
errorCode, errorMessage |
Empty when Twilio accepted it. |
Good to know
- The step succeeds when Twilio accepts the message, not when the phone receives it. A message Twilio cannot deliver later shows as undelivered or failed on Get a message.
- Runs once per item. Ten items send ten texts.
- Long texts are split. Twilio sends a text over 160 characters (70 with characters outside the basic alphabet, such as Hindi) as several parts, and bills each part.
- MMS — a picture in Media address — works only to and from numbers in the United States and Canada. Elsewhere Twilio sends a link instead, or refuses.
- A messaging service sends from its own pool of numbers; Twilio chooses which.
- On a trial account every text starts with Twilio's trial notice and goes only to verified numbers.
If something goes wrong
| What you see | Why | What to do |
|---|---|---|
| Twilio refused: The number +919876543210 is unverified. Trial accounts cannot send messages to unverified numbers; … | A trial account, and the number is not verified. | Verify it in Twilio under Verified Caller IDs, or upgrade the account. |
| Twilio refused: The 'To' number … is not a valid phone number. | To is not a number in international form. | Write it with + and the country code, no spaces. |
| Twilio refused: The 'From' number … is not a valid phone number, shortcode, or alphanumeric sender ID. | From is not one of the account's numbers. | Choose it from the list. |
| Twilio refused: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: … | The account is not allowed to send to that country. | Allow the country in Twilio under Messaging › Settings › Geo permissions. |
| Message is empty when the step ran — an earlier step may not have given the value it names. / To is empty when the step ran — … | The value came out empty. | Check the values it reads. |
| Twilio refused: Authenticate Check the connection's details on Connections. | The Auth Token was changed in Twilio. | Revoke the connection and reconnect it with the new token. |
| Could not load the numbers | Twilio did not give the list. "What you set here is kept." | Select Try again, or Reconnect if offered. |