Wait for WhatsApp Message
Twilio
Twilio
Wait for WhatsApp Message
Triggered when a WhatsApp message is received on your Twilio number. Configure your Twilio Sandbox or production number webhook URL to point to this integration's webhook endpoint.
Trigger
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
from | text | Optional | Filter: only trigger for messages from this WhatsApp number. The whatsapp: prefix is optional — it will be added automatically if omitted. Leave empty to accept from any sender. |
to | text | Optional | Filter: only trigger for messages sent to this WhatsApp number. The whatsapp: prefix is optional — it will be added automatically if omitted. Leave empty to accept for any recipient. |
contains_text | text | Optional | Filter: only trigger when the message body contains this text (case-insensitive). Leave empty to accept any message body. |
hasMedia | yes/no | Optional | When set, only trigger for messages that match the specified media presence (yes = must have media, no = must not have media). |
Outputs
| Name | Type | Description |
|---|---|---|
messageSid | text | Unique SID of the incoming Twilio message |
accountSid | text | Twilio Account SID that received the message |
from | text | Sender's WhatsApp number with whatsapp: prefix |
to | text | Recipient WhatsApp number with whatsapp: prefix |
body | text | Text content of the received WhatsApp message |
profileName | text | WhatsApp profile name of the sender |
numMedia | text | Number of media items attached to the message |
hasMedia | yes/no | Whether the message contains one or more media attachments |
mediaItems | array of object | Media URLs and content types as received from the Twilio webhook (MediaUrl/MediaContentType). Requires Twilio authentication to download. |
url | text | Twilio media URL (MediaUrlN from the webhook) |
contentType | text | MIME type of the media item (MediaContentTypeN from the webhook) |
mediaFiles | files | Media files attached to the message, resolved as usable file values with base64 content |