n8n-nodes-whatsapp-dynamic
v0.1.3
Published
n8n community node for sending dynamic WhatsApp Cloud API messages
Maintainers
Readme
n8n-nodes-whatsapp-dynamic
A private/community n8n node for sending dynamic WhatsApp Cloud API messages.
Supported send types
- text
- image
- audio
- video
- document
- sticker
- location
- contacts
- template
- interactive
- reaction
Why this node uses JSON for some message types
WhatsApp template and contacts payloads can become deeply nested. This node gives you a form-based UI for common interactive messages (reply buttons and lists), a guided experience for text and media, and raw JSON where the Cloud API shape is still easiest to express in one field (templates, contacts, and advanced interactive types such as catalog or flow messages).
Install locally in a self-hosted n8n instance
Option 1: install from a local folder during development
Copy this package into your custom extensions folder and build it:
cd ~/.n8n/custom
cp -R /path/to/n8n-nodes-whatsapp-dynamic .
cd n8n-nodes-whatsapp-dynamic
npm install
npm run buildThen restart n8n.
Option 2: install from npm later
Publish it under a package name like n8n-nodes-whatsapp-dynamic, then install it from Settings → Community Nodes in self-hosted n8n.
Credentials
Use the built-in WhatsApp API credential (same as the official WhatsApp Business Cloud node: access token + business account ID).
Set Phone Number ID on the node. The Graph API version in the request URL is fixed (v23.0 in code) and is shown in a notice on the node and echoed as graphApiVersion on successful runs so you can confirm what was called.
Interactive messages (form UI)
When Message Type is interactive, set Interactive layout:
- Reply buttons — Body text, optional header/footer, then choose Reply buttons source:
- Labels (JSON array) — e.g.
["Yes","No","Maybe"]or={{ $json.choices }}. Titles are the strings; ids are generated from each title (safe slug, with deduplication). Each label must be ≤ 20 characters. - Manual — fixed fields per button (explicit id + title).
- Full objects (JSON array) — e.g.
[{"id":"yes","title":"Yes"}]when you need custom ids from upstream data.
- Labels (JSON array) — e.g.
- List message — Body text, optional header/footer, the List menu button label (the bubble that opens the list), and one or more List rows. Rows that share the same Section title are grouped into a single list section.
- Custom JSON — Paste any valid
interactiveobject (for example product or flow messages) exactly as described in Meta’s documentation.
Upgrading older workflows
Workflows saved before Interactive layout existed still send the payload from Interactive JSON until you pick Reply buttons or List message once (or switch to Custom JSON and keep editing JSON).
Example payloads
Text
- Message Type:
text - To:
9715XXXXXXXX - Text Body:
Hello from n8n
Template JSON
{
"name": "order_update",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Abdul"
},
{
"type": "text",
"text": "#12345"
}
]
}
]
}Interactive (Custom JSON only)
If you use Interactive layout → Custom JSON, the object must match the Cloud API. Example reply-button shape:
{
"type": "button",
"body": { "text": "Choose one" },
"action": {
"buttons": [
{ "type": "reply", "reply": { "id": "yes", "title": "Yes" } },
{ "type": "reply", "reply": { "id": "no", "title": "No" } }
]
}
}For list-shaped payloads, see Interactive list messages in Meta’s docs.
Notes
- This package currently sends messages only. It does not include webhook trigger nodes for inbound messages or delivery statuses.
contactsexpects one contact object in the field and wraps it into the array required by the API.- Media upload by binary is not included yet. For now, use a public HTTPS URL in the media link field.
- Templates must already exist and be approved in your WhatsApp Business account before they can be sent.
