Skip to content

WhatsApp Business

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.

ParameterTypeRequiredDescription
credentials_idcredentialsYesWhatsApp Business account
operationselectYesOperation: sendText, sendTemplate, sendImage, sendDocument, sendAudio, sendVideo, sendLocation, sendButtons, sendList, markAsRead, getTemplates, getBusinessProfile, updateBusinessProfile, uploadMedia, getMedia, downloadMedia
to / toKeytextConditionalDestination phone number with country code (e.g.: 521234567890)
text / textKeytextConditionalMessage text
templateNametextConditionalApproved template name (for sendTemplate)
languageCodetextNoTemplate language code (default: “es”)
templateComponentsjsonNoTemplate components (header, body, buttons)
imageUrltextConditionalImage URL to send
documentUrltextConditionalDocument URL to send
buttonsjsonConditionalButtons array (max 3, title max 20 characters)
sectionsjsonConditionalSections for interactive list
headerTexttextNoHeader text (for buttons and lists)
footerTexttextNoFooter text (for buttons and lists)

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)
{
"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"
}
}
{
"credentials_id": 1,
"operation": "sendText",
"to": "521234567890",
"text": "Hola, tu pedido ha sido enviado"
}
{
"credentials_id": 1,
"operation": "sendTemplate",
"to": "521234567890",
"templateName": "order_confirmation",
"languageCode": "es"
}
  • 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 continueOnError parameter allows the workflow to continue even if the operation fails
  • API errors include specific WhatsApp code and details
  • 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