Twilio
Send SMS and WhatsApp messages from a Twilio number, send approved WhatsApp templates, and read messages back to learn whether they were delivered.
Connect a Twilio account to send and receive SMS and WhatsApp. Sends a free-form message on either channel, sends an approved WhatsApp template (the only send that works when you are starting the conversation rather than replying), reads a message back by SID to learn its real outcome, and lists recent messages in both directions. Inbound messages and replies can trigger an automation through a Twilio event trigger. Sending returns QUEUED rather than delivered - the outcome lands on the message record moments later, which Get message reads.
Connect
| Credential field | Required | Where it comes from |
|---|---|---|
Auth Token (AUTH_TOKEN) | Yes | Revealed beside the Account SID on the Twilio Console dashboard. It both authenticates outbound calls and signs inbound webhooks, so rotating it in the Console breaks both until it is re-pasted here. |
| Setting | Required | What it is |
|---|---|---|
Account SID (ACCOUNT_SID) | Yes | From the Twilio Console dashboard - starts with AC and is 34 characters. |
Default sender (DEFAULT_FROM) | No | The Twilio number to send from when a message does not name one, in E.164 (+14155552671). Without the whatsapp: prefix - the channel is chosen per message. |
Messaging Service SID (MESSAGING_SERVICE_SID) | No | Optional. A Messaging Service (starts MG) to send SMS through instead of a single number, applying its sender pool and compliance rules. Not used for WhatsApp, which needs an explicit sender. |
Tools
| Tool | Access | What it does |
|---|---|---|
Send message (yekar.twilio.send-message) | Write | Send an SMS or a free-form WhatsApp message. ON WHATSAPP THIS ONLY WORKS INSIDE AN OPEN 24-HOUR SERVICE WINDOW: WhatsApp opens that window each time the customer messages the business and closes it 24 hours after their last message, and outside it this call is rejected (error 63016) and you must use Send template instead. There is no way to check the window from here - it is only observable from the inbound messages on your webhook. So on WhatsApp use this to REPLY to someone who just wrote, and Send template to initiate; on SMS there is no window and this is always the right tool. Success means Twilio QUEUED the message, not that it was delivered - read it back with Get message to learn the outcome. A long SMS is split into several billed segments; the result says how many. |
Send template (yekar.twilio.send-template) | Write | Send an APPROVED WhatsApp template by its Content SID. This is the only WhatsApp send that works at any time: a free-form message needs an open 24-hour service window, a template does not, so business-initiated notifications, reminders, alerts and approval requests all go through here. Use it whenever YOU are starting the conversation rather than replying to one. The template's variable count must match what Meta approved. Recipients must have opted in; messaging people who have not degrades the sender's quality rating and can get it restricted. Success means Twilio QUEUED the message, not that it was delivered. |
Get message (yekar.twilio.get-message) | Read | Read one message back by its SID to learn what actually happened to it. This is how a send's OUTCOME is discovered: a send returns queued, and the real result - delivered, undelivered, failed, or read on WhatsApp - lands on the record some seconds or minutes later, along with any carrier error code and the final price. A message still in a non-terminal status is reported as pending rather than as a result. |
List messages (yekar.twilio.list-messages) | Read | List recent messages on the account, newest first, optionally narrowed to one counterparty or a date. Covers both directions - inbound messages people sent you and outbound ones you sent - so it is how you see a conversation's history without a webhook. Twilio reports NO total and pages with an opaque cursor, so this returns one page and says whether more exist; it is not a count of anything. |
Get account (yekar.twilio.get-account) | Read | Read the connected Twilio account itself - its name, status (active, suspended, closed) and type (Trial or Full). This is the credential's own proof: it succeeds only when the stored Account SID and Auth Token belong to the same account, so it is the call to make when a send reports error 20003 before touching anything else. A Trial account can only message verified numbers; a subaccount reports its parent as ownerAccountSid. |
Notes
- In the Twilio Console dashboard, copy the Account SID (it starts with
AC) and reveal the Auth Token beside it. Paste both here - the Auth Token also verifies inbound webhooks, so one paste covers both directions. - Set the Default sender to the Twilio number you send from, in full international form (+14155552671). Store it WITHOUT any
whatsapp:prefix - the channel is chosen per message, and a prefixed value would pin it to one. - For SMS you also need geographic permissions enabled for the destination country (Console → Messaging → Geo permissions); most regions are off by default and a blocked country reads as an unroutable number.
- For WhatsApp, the sending number must be registered as a WhatsApp sender on the account. While testing, join the Twilio WhatsApp sandbox from your phone and use the sandbox number - it needs no Meta business verification.
- To START a WhatsApp conversation you need an approved template: build it in Console → Content Template Builder and use its Content SID (starts
HX) with Send template. A free-form WhatsApp message only works in the 24 hours after the person last messaged you. - To receive replies, add a Twilio event trigger on this connection and paste the endpoint it shows into the number's 'A message comes in' webhook in the Console, with the method set to HTTP POST.