Overview
This node, named "WhatsApp Sender," enables sending WhatsApp messages through a third-party WhatsApp API service. It supports multiple operations including sending plain text messages, sending files with optional messages, and sending pre-approved message templates with variable substitution.
The "Send Template" operation allows users to send messages based on pre-approved templates, which is useful for businesses that want to automate notifications, alerts, or customer communications while adhering to WhatsApp's messaging policies.
Common scenarios:
- Sending appointment reminders using a template with customer-specific variables.
- Dispatching order confirmations or shipping updates with dynamic content.
- Automating customer support messages with standardized templates.
Example:
A business can use this node to send a "Thank you for your purchase, {{customer_name}}" template by specifying the recipient's WhatsApp number, the template ID, and providing the customer's name as a variable.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | Recipient's WhatsApp number with country code (e.g., +1234567890). |
| Template ID | ID of the pre-approved WhatsApp message template to send (e.g., template_12345). |
| Template Variables | Variables to replace in the template message. Each variable has a name (key) and a replacement value. |
Details on Template Variables:
- Variable Name: The placeholder name used inside the WhatsApp template (e.g.,
customer_name). - Value: The actual string to replace the variable with (e.g.,
John Doe).
Output
The node outputs an array with one item per input. Each output item contains a json object with the following structure:
success: Boolean indicating if the message was sent successfully.operation: The operation performed, here always"sendTemplate"for this context.to: The recipient's WhatsApp number.- Additional fields from the API response under
...d.data, which may include message IDs or status details returned by the WhatsApp API.
If the message fails to send, the output will contain:
success: falseerror: Error message describing the failure.operationandtofor context.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the WhatsApp API service.
- The node makes HTTP POST requests to
https://wsp.multist.net/api/create-message. - The user must configure the node with valid credentials containing at least an app key and an auth key.
- The WhatsApp API service must have the specified template ID pre-approved and available.
Troubleshooting
- Invalid phone number format: The node validates the phone number against E.164 format (e.g., +1234567890). Ensure the number includes the country code and no extra characters.
- Template ID missing or incorrect: The template ID must match a pre-approved template in the WhatsApp API system.
- Variables mismatch: If the template requires variables, ensure all required variables are provided with correct names.
- API errors: If the API returns a failure message, it will be shown in the error output. Common causes include invalid credentials, exceeded rate limits, or unapproved templates.
- Message length: Although not directly applicable to templates, other operations enforce a maximum message length of 1000 words.
- Network issues: Ensure the node can reach the external API endpoint without firewall or proxy restrictions.
To resolve errors, verify credentials, phone number formatting, template availability, and network connectivity.
Links and References
- WhatsApp Business API Documentation
- WhatsApp Message Templates Guide
- n8n HTTP Request Node Documentation (for understanding underlying request mechanics)