HostWebhook Help Center

Connect Twilio to your flows

Connect your Twilio account with a restricted API key, send SMS and WhatsApp messages from a flow, start a flow when someone texts your number, and let an AI node reply for you.

Time about 12 minutesYou need a HostWebhook account and a Twilio account with a phone numberUpdated November 26, 2026

Twilio gives you phone numbers that send and receive SMS, and access to WhatsApp. With HostWebhook you can send an SMS or a WhatsApp message from a flow, read your messages, look up a number, start a flow when someone texts your Twilio number, and let an AI node reply for you.

Every message costs money in your Twilio account. Twilio charges each SMS part and each WhatsApp message, including the ones your number receives and the ones that fail to send. HostWebhook adds nothing. For your first tests, send to your own phone.

Connect your Twilio account

HostWebhook connects with a restricted API key that you create in Twilio. Your Auth Token is never asked for.

In the Twilio Console, open API keys & tokens (in your account settings) and click Create API key:

  1. Give the key a name only HostWebhook uses, like HostWebhook.
  2. Keep the region United States (US1).
  3. Set the key type to Restricted.
  4. Tick the permissions in the table below, and nothing else.
  5. Click Create.

Twilio shows the secret only once.

Right after Create, Twilio shows the key's SID (it starts with SK) and its secret. If you don't see the secret, scroll up: it is in the Secret box, with a Copy the secret button. Keep that page open, and don't click Done until you have pasted both values in HostWebhook. If you lose the secret, delete that key and create a new one.

Then, in HostWebhook, click Settings in the left sidebar, then Credentials, and start a new credential. Choose Twilio.

  1. Marker 1: In the list of types, choose Twilio.
  2. Marker 2: Give the credential a name, like My Twilio account.
  3. Marker 3: Paste your Account SID (it starts with AC; it's on your Twilio Console home page), the key's API key SID (SK…) and its API key secret.
  4. Marker 4: Click Connect Twilio. HostWebhook checks the key against your account and counts your numbers.
  5. Marker 5: Which permissions? and What does it cost? open the lists below.
New Credential page with Twilio selected, the credential name, the Account SID, API key SID and API key secret fields and the Connect Twilio button
  1. Marker 1: Which permissions? lists what to tick in Twilio.
  2. Marker 2: HostWebhook never asks to delete messages, buy numbers or change your account.
  3. Marker 3: Each permission, what it is for, and what stops working without it.
  4. Marker 4: What does it cost?: what Twilio charges.
The Which permissions and What does it cost sections of the Twilio credential, open
Twilio productResource and actionsWhat for
Messagingmessages: create, list, readSending SMS, MMS and WhatsApp messages, reading them, and the trigger's Test push
Messagingmessages.media: list, readThe files of a message
Messagingservices: listThe Messaging Service picker
Messagingwhatsapp-senders: listThe WhatsApp sender picker
Messagingcontent-templates: list, readThe template picker and its variables
Phone-numbersactive-numbers: list, readChecking the key when you connect, the From picker and the trigger's number. Without it, the credential won't connect.
Event-streamssink: create, read, list, delete · sink.test: createThe trigger
Event-streamssubscription: create, read, list, update, delete · subscription.subscribed-event: listThe trigger and its daily health check
Lookupphone-numbers: readLook up a number (the basic lookup, free)

That's 23 permissions. If you only send messages, you can leave out the Event Streams ones: the trigger won't work without them.

US1 accounts only, for now.

HostWebhook works with accounts in Twilio's United States region (US1), where most accounts are. If Twilio rejects the key when you connect, check that you pasted the right Account SID, and that the key still exists in API keys & tokens: a key deleted in Twilio is rejected too.

Add a Twilio node

In Flows, add a Twilio node and open it. Pick your credential under Twilio account.

  1. Marker 1: The Twilio account the node sends from: the end of its Account SID and how many phone numbers it has.
  2. Marker 2: Single operation: the node does one thing every time it runs, with values taken from the event that reaches it. For example: a text to the customer who just paid, a WhatsApp message to your team when a form arrives.
  3. Marker 3: AI toolkit: an AI node decides which tool to use (see step 07). Because every message costs money, it comes with two limits.
  4. Marker 4: The operation, here Send SMS (step 03). The ones that send are marked, and each message costs money in your Twilio account.
Twilio node page with the connected account, the Single operation and AI toolkit modes and the Send SMS operation

Choose what it does

Under Operation, open the list and pick one of the eight operations. They come in four groups. Only the two in Send cost money; none of them deletes anything.

  1. Marker 1: The operation you picked, here Send SMS.
  2. Marker 2: Type to search the list.
  3. Marker 3: The operations, with what each one does. The group name is above each block.
The operation list of the Twilio node, open on Send SMS
GroupOperations
SendSend SMS, Send WhatsApp
MessagesList messages, Get message
StructureList phone numbers, List Messaging Services, List templates
NumbersLook up a number

Every field takes a template such as {{payload.from}}, so you can fill it in from the event that started the flow.

Pick the number it sends from

From is picked from your account, so you don't need to type your number.

  1. Marker 1: From: the number the message leaves from, with what it can do (SMS, MMS, voice).
  2. Marker 2: Refresh reloads the list after you change something in Twilio.
  3. Marker 3: Your numbers. With Send WhatsApp, the list shows your WhatsApp senders, and the Sandbox if you use it.
The From selector of the Twilio node, open on the numbers of the account

You can also write a number in the international format, like +14155550100, or a template.

Send an SMS or a WhatsApp message

With Send SMS, pick From, write who it goes to in To, and the text in Message.

  1. Marker 1: From: your Twilio number.
  2. Marker 2: To: the phone number with its country code, like +14155550100. Here it's a template, {{payload.from}} (shown as a From chip), so the reply goes to whoever texted.
  3. Marker 3: Message: the text. Under it, how many SMS parts it takes: a long text is sent, and charged, as several parts.
  4. Marker 4: Media (optional): the link to an image or a file, sent as an MMS. Not every country receives MMS.
  5. Marker 5: Daily limit: the most SMS parts this node sends in a day, so a loop can't run up costs. From 1 to 10,000, for example 200.
  6. Marker 6: Open Before you text people before your first real messages.
Send SMS with From, To, the message, Media, the sending limit and the Run button

Click Run to try it. The message is sent for real, Twilio charges it, and the node shows what Twilio returned: its sid and its status, such as queued.

With Send WhatsApp, the fields are almost the same.

  1. Marker 1: From: your WhatsApp sender, here the Twilio Sandbox.
  2. Marker 2: To: the person's WhatsApp number, here whoever wrote.
  3. Marker 3: Send as: Reply works within 24 hours of the person's last message to you. After that, WhatsApp only lets you send an approved template.
  4. Marker 4: Message: the text of a reply.
  5. Marker 5: Template and Variables: for a template, picked from your Content Template Builder, with a value for each variable.
  6. Marker 6: Messaging Service (optional): send through one of your Messaging Services instead of a single number.
Send WhatsApp with the Sandbox as the sender, the person who wrote as the recipient, Send as Reply, the message, the template and the Messaging Service

When someone texts STOP, Twilio stops your messages to them.

After a STOP, Twilio refuses to send to that person, and the node says: This person texted STOP. Twilio won't send until they text START. Twilio still records the failed message, and may charge a fraction of a cent for it.

WhatsApp numbers from Mexico

WhatsApp often keeps a Mexican mobile as +521 followed by the 10 digits, while an SMS uses +52 and the 10 digits. With the WhatsApp Sandbox, send to the number exactly as Twilio saved it when the person joined: a message to +52 without the 1 fails with error 63015 (not joined), and Twilio still charges it.

When the daily limit is reached

The node stops sending until the next day and says so: This node sent its daily limit (200). Raise it in the node. It doesn't call Twilio, so nothing is charged.

Start a flow when someone texts your number

Twilio can also start a flow. Add a Trigger node, choose Twilio as its service, and pick your credential.

  1. Marker 1: The credential. Its key needs the Event Streams permissions (step 01). The trigger watches numbers that account owns.
  2. Marker 2: Number: the Twilio number to watch. A trigger watches one number. Your number's own webhook isn't changed, so whatever you already have there, like a voice assistant, keeps working.
  3. Marker 3: Channel (optional): SMS or WhatsApp. Empty means both.
  4. Marker 4: Event Trigger: Message received, when a text reaches your number. A STOP fires it too, with optOut set, so your flow can note it.
  5. Marker 5: The health check runs once a day. Test push tries the trigger before you activate it.
  6. Marker 6: The watch: Watch is live once the trigger is active, with the last message it received.
Twilio trigger page with the credential, the number, the channel, the event, the health check, the test button and the watch that is live

Click Test push to see what the trigger will deliver. It reads the latest messages your number received and shows them as a "Message received" notice will arrive. Your flow doesn't run.

  1. Marker 1: Test push reads the latest messages received.
  2. Marker 2: The summary: how many it found, and that nothing was dispatched.
  3. Marker 3: Click one to set it as the node's output, with the exact shape the trigger delivers: from, to, body, channel, numMedia… Copy its {{payload.x}} paths to build the next node.
  4. Marker 4: Another message, here a START.
The result of Test push: the messages found and one of them open

When everything is set, click Activate. A trigger needs at least one connected node to activate. HostWebhook then sets up one Event Streams sink for your Twilio account, shared by all its triggers, and removes it when the last trigger is deactivated or deleted.

If the key stops working, the trigger pauses.

Once a day, HostWebhook checks that Twilio still accepts the key. If you deleted it in Twilio, the trigger pauses (Twilio no longer accepts its key) and the credential shows Needs reconnect. Give the credential a new key of the same account in Edit keys and settings, then activate the trigger again.

WhatsApp and the Sandbox

The trigger only watches numbers your account owns. The WhatsApp Sandbox number belongs to Twilio, so it can't be watched: to start flows from WhatsApp, use a WhatsApp sender of your own. Sending through the Sandbox works (step 05).

Let an AI node text people (optional)

In step 02, choose AI toolkit instead of Single operation. The node then offers its eight tools, such as send_twilio_sms and list_twilio_messages, that an AI node calls by name when you connect it from the AI node's Tools. You can also expose the same node through one of your MCP servers.

  1. Marker 1: The node is exposed as 8 Twilio tools. The messages the model reads are written by whoever texts your number: HostWebhook tells it to treat them as data, not as instructions.
  2. Marker 2: Send from: fixed here. The AI picks who to text and what to say, never the number it sends from.
  3. Marker 3: Limits: the Daily limit of the node, and Messages per run, the most SMS parts the AI may send in one run (from 1 to 20, for example 3).
  4. Marker 4: Who the AI can text: here, only the person who wrote, the one whose message started the run.
  5. Marker 5: Open this to see the operations that will be exposed.
  6. Marker 6: Block these tool calls: a blocked tool is removed from every AI node and MCP server that uses this node. For example, block send_twilio_whatsapp if the agent should only send SMS.
The AI toolkit mode of the Twilio node, with the fixed sender, the limits, who the AI can text, the operations and the blocked tools

When the AI asks for something a limit doesn't allow, the tool refuses without calling Twilio, and the run shows why.

  1. Marker 1: The run: its steps and how long it took.
  2. Marker 2: The Twilio tool, with the calls that were refused.
  3. Marker 3: A second message in the same run: refused, because Messages per run was 1.
  4. Marker 4: A message to another number: refused, because the AI can only text the person who wrote.
A run of an AI node with Twilio tools: the first message sent, the second refused by the limit per run and the third refused because the number isn't allowed

With MCP, pick a list of numbers.

An MCP call has no message that started it, so only the person who wrote allows nobody. To use the node through MCP, choose Only these in Who the AI can text and add the numbers, like +14155550100. In MCP, the sending tools are marked as destructive; the others only read.

Disconnect Twilio (optional)

To stop HostWebhook from using your account, delete the credential: in Settings, Credentials, open the Twilio credential and click Delete. HostWebhook lists the nodes and triggers that use it: they keep their configuration but stop running until you pick another credential. Click Disconnect and delete.

  1. Marker 1: The nodes and triggers that still use the credential.
  2. Marker 2: Where to revoke the key too: in Twilio, under API keys.
  3. Marker 3: Disconnect and delete removes the credential.
The delete dialog of a Twilio credential, with the nodes that still use it and where to revoke the key in Twilio

HostWebhook first stops every trigger that used the credential and removes its Event Streams sink, then deletes the credential. A restricted key can't delete itself, so delete it yourself in Twilio: in API keys & tokens, open the key and click Delete this API key.

Powered by TwilioPowered by Twilio