WhatsApp Business
Description
Section titled “Description”This module allows sending messages through Meta’s WhatsApp Business Cloud API (Graph API v18.0). It supports sending text, templates, images, documents, audio, video, location, contacts, interactive messages with buttons and lists. It also allows marking messages as read, querying templates, managing the business profile and handling multimedia files (upload, query URL and download).
The operation is determined by the operation field or by the node name. The sender’s phone number (phoneNumberId) can be configured in the credentials or in each node.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | WhatsApp Business account |
| operation | select | Yes | Operation: sendText, sendTemplate, sendImage, sendDocument, sendAudio, sendVideo, sendLocation, sendButtons, sendList, markAsRead, getTemplates, getBusinessProfile, updateBusinessProfile, uploadMedia, getMedia, downloadMedia |
| to / toKey | text | Conditional | Destination phone number with country code (e.g.: 521234567890) |
| text / textKey | text | Conditional | Message text |
| templateName | text | Conditional | Approved template name (for sendTemplate) |
| languageCode | text | No | Template language code (default: “es”) |
| templateComponents | json | No | Template components (header, body, buttons) |
| imageUrl | text | Conditional | Image URL to send |
| documentUrl | text | Conditional | Document URL to send |
| buttons | json | Conditional | Buttons array (max 3, title max 20 characters) |
| sections | json | Conditional | Sections for interactive list |
| headerText | text | No | Header text (for buttons and lists) |
| footerText | text | No | Footer text (for buttons and lists) |
Credentials
Section titled “Credentials”Service type: whatsapp_business. Stored in the servicecredentials table.
Configuration fields:
- accessToken: Permanent access token for the WhatsApp Business API (required)
- phoneNumberId: WhatsApp Business phone number ID
- businessAccountId: WhatsApp business account ID (for querying templates)
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "messageResult": { "messaging_product": "whatsapp", "contacts": [{ "input": "521234567890", "wa_id": "521234567890" }], "messages": [{ "id": "wamid.xxxxx" }] } }, "_meta_": { "operation": "sendText", "phoneNumberId": "123456789", "service": "whatsapp_business" }}Usage Example
Section titled “Usage Example”Basic case - Send text
Section titled “Basic case - Send text”{ "credentials_id": 1, "operation": "sendText", "to": "521234567890", "text": "Hola, tu pedido ha sido enviado"}Basic case - Send template
Section titled “Basic case - Send template”{ "credentials_id": 1, "operation": "sendTemplate", "to": "521234567890", "templateName": "order_confirmation", "languageCode": "es"}API Used
Section titled “API Used”- WhatsApp Business Cloud API (Meta Graph API v18.0):
https://graph.facebook.com/v18.0 - Documentation: https://developers.facebook.com/docs/whatsapp/cloud-api
- Interactive buttons are limited to 3 per message, with a maximum title of 20 characters
- List rows have a maximum title of 24 characters and description of 72 characters
- The list button has a maximum of 20 characters
- Templates must be approved by Meta before use
- To initiate conversations with new users, sendTemplate must be used (24h window)
- The phone number must include the country code without the + sign
- Media download returns content in base64
- The
continueOnErrorparameter allows the workflow to continue even if the operation fails - API errors include specific WhatsApp code and details
Related Nodes
Section titled “Related Nodes”- WA Send Text, WA Send Template, WA Send Image, WA Send Document
- WA Send Audio, WA Send Video, WA Send Location, WA Send Contact
- WA Send Buttons, WA Send List, WA Mark as Read
- WA Get Templates, WA Get Business Profile, WA Update Business Profile
- WA Upload Media, WA Get Media, WA Download Media