Actions20
- Message Actions
- Contact Actions
- Ticket Actions
- Session Actions
- Opportunity Actions
Overview
This node integrates with a WhatsApp API to send various types of messages and manage related entities such as contacts, tickets, sessions, and opportunities. Specifically, the Send Template operation under the Message resource allows sending pre-approved WhatsApp Business message templates in a specified language to a given phone number.
Common scenarios for this node include:
- Automating customer notifications using standardized WhatsApp templates.
- Sending transactional or promotional messages that require compliance with WhatsApp Business policies.
- Integrating WhatsApp messaging into CRM or support workflows where templated messages are needed.
For example, a business can use this node to send appointment reminders or order confirmations using approved WhatsApp templates, ensuring consistent communication and compliance.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The recipient's WhatsApp number in international format (e.g., 5511999999999). |
| External Key | A unique system key to identify the message externally, useful for tracking or deduplication. |
| Close Ticket | Boolean flag indicating whether to close the associated ticket after sending the message. |
| Template Name | The name of the approved WhatsApp template to be sent. |
| Language Code | The language code for the template message (e.g., pt_BR for Brazilian Portuguese, en_US for US English). |
Output
The node outputs JSON data representing the response from the WhatsApp API after attempting to send the template message. This typically includes status information about the message delivery or any errors returned by the API.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"json": {
"status": "success",
"messageId": "abc123",
"details": { ... }
},
"pairedItem": {
"item": 0
}
}
Dependencies
- Requires an API key credential configured in n8n to authenticate requests to the WhatsApp API.
- The node uses the base URL and instance ID from the credentials to construct API endpoints.
- The WhatsApp API service must have the specified template approved and available for use.
- Proper network connectivity to the WhatsApp API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid phone number format: Ensure the phone number is in the correct international format without symbols or spaces.
- Unapproved template name: The template name must exactly match an approved WhatsApp Business template.
- Incorrect language code: Use valid language codes supported by the WhatsApp template.
- API authentication failures: Verify that the API key credential is correctly set up and has required permissions.
- Network or timeout errors: Check connectivity to the WhatsApp API endpoint.
Error messages:
"Invalid template name": Confirm the template name matches an approved template."Unauthorized"or"Authentication failed": Recheck API credentials."Phone number not registered on WhatsApp": Verify the recipient's number is active on WhatsApp."Template language not supported": Use a supported language code for the template.
Resolving these usually involves verifying input parameters, credentials, and API access.