Tools
Send WhatsApp messages
Usage Instructions
Integrate WhatsApp into the workflow. Can send messages.
Tools
whatsapp_send_message
Send WhatsApp messages
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Yes | Recipient phone with country code |
message | string | No | Message content to send (text mode; required when mode is text or omitted) |
mode | string | No | Mode: 'text' | 'list' | 'interactive' | 'template' | 'image' | 'video' | 'audio' | 'document' | 'sticker' | 'location' | 'contacts' | 'reaction' | 'raw'. Back-compat: 'media' with media.type. |
interactive | object | No | Interactive payload (list/buttons) |
list | object | No | List message: { header?, body, footer?, buttonText?, sections: [{ title?, rows: [{ id, title, description? }] }] }. Session-only (recipient must have messaged within 24h) -- use template mode to reach outside that window. |
rawPayload | object | No | Send any valid Cloud API payload |
connectionId | string | No | A WhatsApp account connected in workspace Settings. Preferred over phoneNumberId/accessToken below. |
phoneNumberId | string | No | WhatsApp Business Phone Number ID (only needed without a connectionId) |
accessToken | string | No | WhatsApp Business API Access Token (only needed without a connectionId) |
media | object | No | Media for image/video/audio/document/sticker |
location | object | No | Location payload |
contacts | object | No | Contacts array payload |
reaction | object | No | Reaction payload |
template | object | No | Approved template to send directly: { name, language, components? }. Alternative to templateId for callers that already know the exact Meta template shape. |
templateId | string | No | An approved template (from this connection) selected via the template picker. Preferred over template. |
templateVariables | object | No | Variable values for the picked template, keyed by component: { "header": [...], "body": [...] } |
templateCarouselCards | object | No | Only for a Carousel template: { cards: [{ mediaUrl }] }, one entry per card in template order. A fresh media upload is required on every send. |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Send success status |
messageId | string | Unique WhatsApp message identifier |
httpStatus | number | HTTP status code from Graph API |
error | string | Error message (if any) |
errorCode | string | Graph API error code (if any) |
errorType | string | Graph API error type (if any) |
errorSubcode | string | Graph API error subcode (if any) |
traceId | string | Facebook trace id (if any) |
phoneNumber | string | Recipient phone number (echoed) |
status | string | Message delivery status (if present) |
timestamp | string | Message send timestamp (if present) |
meta | json | Light metadata (to/mode/msgType) |
rawResponse | json | Full Graph API response body |
Triggers
whatsapp_webhook
Trigger workflow from WhatsApp messages and events via Business Platform webhooks
Output
| Parameter | Type | Description |
|---|---|---|
messageId | string | Unique message identifier |
from | string | Phone number of the message sender |
phoneNumberId | string | WhatsApp Business phone number ID that received the message |
messageType | string | Type of message: text, image, video, audio, document, sticker, location, contacts, interactive, button, reaction, order |
timestamp | string | Message timestamp (Unix timestamp) |
text | string | Message text content (for text messages) |
media.id | string | Media file ID (for image/video/audio/document/sticker) |
media.mimeType | string | Media MIME type |
media.sha256 | string | Media file hash |
media.caption | string | Media caption (for image/video/document) |
media.filename | string | Document filename (for document) |
media.url | string | Durable Mandala-hosted URL for the downloaded media (only when Download Media Attachments is enabled) |
media.key | string | Mandala storage key for the downloaded media (only when Download Media Attachments is enabled) |
attachments | file[] | Downloaded media files (only when Download Media Attachments is enabled and an access token is configured) |
location.latitude | number | Location latitude |
location.longitude | number | Location longitude |
location.name | string | Location name |
location.address | string | Location address |
interactive.interactiveType | string | Interactive type: button_reply or list_reply |
interactive.buttonReply.id | string | Button ID that was clicked |
interactive.buttonReply.title | string | Button title |
interactive.listReply.id | string | List item ID that was selected |
interactive.listReply.title | string | List item title |
interactive.listReply.listDescription | string | List item description |
interactive.flowReply.name | string | The Flow component name that completed |
interactive.flowReply.responseData | object | The Flow's final response payload |
button.payload | string | Button payload data |
button.text | string | Button text |
reaction.messageId | string | ID of message being reacted to |
reaction.emoji | string | Reaction emoji |
contacts | array | Array of contact objects shared |
order.catalogId | string | The catalog the order was placed against |
order.text | string | Optional note the customer added to the order |
order.productItems | array | Ordered items: [{ productRetailerId, quantity, itemPrice, currency }]. itemPrice's unit convention (minor vs. major) is unconfirmed from Meta's docs -- inspect a real payload before assuming. |
raw | object | Complete raw message object from WhatsApp for advanced processing |
Notes
- Category:
tools - Type:
whatsapp