WhatsApp Business Cloud API¶
Overview¶
The WhatsApp Business task sends a WhatsApp message from one of the account's WhatsApp Business connections (Meta's Cloud API). It has three actions:
- Send Template — an approved template, to anyone, at any time.
- Send Text — free text, only inside the 24-hour customer-service window.
- Send Media — an image, video, document or audio file, only inside that window.
Each message is recorded on the contact's WhatsApp chat thread in BaseCloud, as one sent from the CRM is. Templates themselves are created and approved in Meta's WhatsApp Manager; this task sends them.
Prerequisites¶
- A WhatsApp Business account connected in Settings → WhatsApp Business. The task only picks from connections already made there.
- For templates: the template approved by Meta in the language you send.
- For text and media: the recipient must have messaged the number in the last 24 hours.
Outputs¶
Session fields describe the 24-hour customer-service window: outside it, only template messages can be sent.
Reference fields as {{task_<ID>_<field>}}.
| Field | Type | Notes |
|---|---|---|
session_open |
boolean | Whether the 24-hour messaging window was open for this number when the task ran (empty if it could not be checked). |
session_expires_at |
string | When that window closes. |
success |
boolean | true once the message was handed to WhatsApp. |
message_id |
string | WhatsApp's id for the message (wamid.…). |
recipient |
string | The number it went to, in international format. |
thread_id |
string | The chat thread in BaseCloud this message was recorded on. |
Always emitted¶
| Field | Type | Notes |
|---|---|---|
run |
boolean | Whether the task succeeded. |
run_text |
string | What happened, including the reason on failure. |

Connections are made in Settings → WhatsApp Business, not on the task — the selector here only picks from what is already connected, and the template list stays empty until one is chosen.
Configuration¶
Builder fields¶
The Field column is the label as it appears in the task builder; Key is the name the value is stored under and referenced by.
| Field | Key | Type | Default | Notes |
|---|---|---|---|---|
| WhatsApp Business Connection | app_connection_id |
app-connection | – | |
| Action | action |
select | send_template |
Options: Send Template · Send Text (session only) · Send Media (session only) |
| Recipient | recipient |
text | – | |
| Template | template_name |
whatsapp-template-select | – | Only shown when action is send_template |
| Template Variables | tpl_params |
whatsapp-template-params | – | Only shown when action is send_template |
| Message Text | message_text |
textarea | – | Only shown when action is send_text |
| Media Type | media_type |
select | image |
Options: Image · Video · Document · Audio. Only shown when action is send_media |
| Media URL | media_url |
text | – | Only shown when action is send_media |
| Caption | caption |
text | – | Only shown when action is send_media |
| Filename | filename |
text | – |
Send Template¶
Pick the connection, the recipient and the template. Template Variables shows one field for each {{1}},
{{2}}… in the template's header and body; each takes text or {{variables}}.
- The template is checked against Meta when the task runs. A template that is no longer approved (or no longer in that language) fails the task: Template '…' (en_US) is no longer available or approved — please reconfigure the task.
- Every variable is required. One that comes out empty fails the task rather than sending a message with a gap: Template '…' not sent: variable {{2}} in the body resolved empty.
- Header File (optional) replaces the template's own header document for this run — a link or a variable, for
example a PDF task's
document_url. Left empty, the template's file is used.
Send Text (session only)¶
Free text, sent only if the recipient messaged in the last 24 hours. Outside that window the task fails at once
without sending: No open 24-hour session with +27… Free-form text can only be sent inside the customer service
window — use Send Template to initiate contact. To fall back to a template, check session_open with an
If before this task.
Send Media (session only)¶
Media Type (Image, Video, Document or Audio) and Media URL are required; Caption is optional, and a document can be given a Filename. The same 24-hour rule applies as for text. BaseCloud fetches the file from the URL, so it must be reachable without signing in, and WhatsApp must accept its type and size.
Recipient¶
One number, in international format (+27821234567) or a variable holding one. A number that cannot be read fails
the task: No valid recipient number provided.
Real-World Examples¶
Reply automatically to an inbound message¶
WhatsApp Message Received
└─ Chat Thread read the conversation so far
└─ AI Prompt draft a reply, memory key {{task_61001_session_id}}
└─ WhatsApp Business send it
Send a template outside the messaging window¶
session_open tells you whether the 24-hour window is still open. Outside it, only templates
can be sent.
Confirm an order over WhatsApp¶
Troubleshooting¶
| Message | What to do |
|---|---|
| No WhatsApp Business connection selected. | Choose a connection on the task. |
| The selected WhatsApp Business connection is no longer available (disconnected or removed). | Reconnect it in Settings → WhatsApp Business, then pick it again. |
| No valid recipient number provided. | Map a number in international format — a Phone Formatter normalises one. |
| No open 24-hour session with … | Send a template instead, or only send text once the contact has written in. |
| Template '…' is no longer available or approved | Re-pick the template; check it in WhatsApp Manager. |
| Template '…' not sent: variable {{N}} … resolved empty. | Check the task that variable reads from ran and has that output. |
| Rate limited — rescheduled for retry. | Nothing — the run is retried automatically. |
FAQ¶
Can I create or edit templates here? No — create them in Meta's WhatsApp Manager. Once approved they appear in the Template list.
Can I see whether a message was delivered or read? Yes, on the contact's WhatsApp chat thread in BaseCloud, which shows each message's status as WhatsApp reports it.
WATI or WhatsApp Business? Both send WhatsApp; this task uses Meta's Cloud API through a connection made in BaseCloud, WATI uses a WATI account's own API.
Related Tasks¶
- WATI - Alternative WhatsApp platform integration
- Email - Fallback communication channel
- SMS - Alternative text messaging
- If Statement - Message routing logic
- Loop - Bulk message sending
- Delay - Rate limiting in campaigns
- Webhook In - Receive WhatsApp webhooks
- Match to Client - Match phone numbers to clients
Technical Details¶
- Type ID: 58
- Function:
taskWhatsAppBusiness()in automationService.js, sending throughwhatsappService.js - API: Meta Graph API (WhatsApp Cloud API)
- Message ID format:
wamid.…