Actions17
Overview
This node integrates with the Z-API WhatsApp service to send various types of WhatsApp messages and perform related chat actions. Specifically, for the Message - Send Text operation, it sends a plain text message to a specified phone number or group ID via the Z-API platform.
Common scenarios where this node is beneficial include:
- Automating customer support by sending notifications or replies through WhatsApp.
- Broadcasting updates or alerts to groups or individual contacts.
- Integrating WhatsApp messaging into workflows for marketing, reminders, or transactional messages.
Example: Sending a "Hello World!" text message to a customer's WhatsApp number automatically after they complete a form on your website.
Properties
| Name | Meaning |
|---|---|
| Instance | Your Z-API instance ID, identifying the WhatsApp session to use. |
| Token | Your Z-API token used for authenticating API requests. |
| Client Token | Your Z-API client token, sent as a header for additional authentication. |
| Phone | The recipient's phone number or group ID where the message will be sent. |
| Message | The text content of the message to send. |
Output
The node outputs a JSON object representing the response from the Z-API service after attempting to send the text message. This typically includes status information about the message delivery, such as success confirmation or error details.
No binary data output is involved in this operation.
Example output structure (simplified):
{
"status": "success",
"messageId": "some-message-id",
"details": { ... }
}
Dependencies
- Requires access to the Z-API WhatsApp service.
- Needs valid credentials: an instance ID, a token, and a client token.
- The node makes HTTP POST requests to the Z-API endpoints.
- Ensure network connectivity to
https://api.z-api.io. - No additional environment variables are required beyond the provided credentials.
Troubleshooting
- Invalid Credentials: If the instance ID, token, or client token are incorrect or expired, the API will reject requests. Verify and update credentials.
- Incorrect Phone Number Format: The phone or group ID must be correctly formatted; otherwise, the message may fail to send.
- Network Issues: Connectivity problems can cause request failures. Check internet access and firewall settings.
- API Rate Limits: Excessive requests might be throttled by Z-API. Monitor usage and respect limits.
- Error Messages: The node throws errors if the operation is unsupported or parameters are missing. Ensure all required fields are filled.
If the node encounters an unsupported operation or resource, it raises an error indicating the invalid combination.
Links and References
- Z-API Official Documentation (for detailed API usage and credential management)
- WhatsApp Business API Overview
- n8n Documentation on HTTP Request Node (for understanding underlying HTTP calls)