Overview
This node integrates with the Z-API service to send WhatsApp messages programmatically. Specifically, the Send Text operation under the Send Message resource allows users to send plain text messages to specified phone numbers via a configured Z-API instance.
Typical use cases include:
- Automating customer notifications or alerts through WhatsApp.
- Sending reminders or confirmations to clients.
- Integrating WhatsApp messaging into workflows for marketing or support.
For example, a business could use this node to automatically send order status updates to customers' WhatsApp numbers after a purchase.
Properties
| Name | Meaning |
|---|---|
| Instance ID | Your Z-API Instance ID used to identify your WhatsApp session. |
| Instance Token | Your Z-API Instance Token for authenticating API requests (kept secret). |
| Client Token | Your Z-API Client Token for additional authentication (kept secret). |
| Phone | The recipient's phone number in international format (e.g., 5511999999999). |
| Text | The text content of the message to be sent. |
| Message ID to Edit | (Optional) ID of an existing message to edit with new content instead of sending a new message. |
| Additional Fields | Optional extra parameters: |
| - Delay Message | Number of seconds (1-15) to wait before sending the message. |
| - Delay Typing | Number of seconds (0-15) to show "Typing..." status before sending the message. |
| - Message ID to Reply | ID of the message to which this message should reply (threaded reply). |
Output
The node outputs a JSON array where each item corresponds to the response from the Z-API service for each input item processed.
The json output typically contains the API response confirming the message was sent or edited, including any relevant metadata such as message IDs or status.
No binary data is produced by this node.
Dependencies
- Requires access to the Z-API WhatsApp messaging service.
- Needs three credentials for authentication: Instance ID, Instance Token, and Client Token.
- No other external dependencies are required.
- Ensure that these credentials are correctly configured in n8n or provided as node parameters.
Troubleshooting
- Invalid Credentials: If the Instance ID, Instance Token, or Client Token are incorrect or expired, the API will reject requests. Verify and update credentials.
- Unknown Operation or Resource: The node only supports the "send-message" resource and "send-text" operation. Using unsupported values will throw errors.
- Phone Number Format: The phone number must be in international format without symbols or spaces. Invalid formats may cause message delivery failure.
- Message ID Issues: When editing or replying to messages, ensure the correct message IDs are provided; otherwise, the API may return errors.
- Delays Out of Range: Delay values must be within allowed ranges (Delay Message: 1-15 seconds, Delay Typing: 0-15 seconds). Values outside these ranges may cause errors.
- Network or API Errors: Temporary network issues or API downtime can cause failures. Use the node’s "Continue On Fail" option to handle such cases gracefully.
Links and References
- Z-API Official Website — For detailed API documentation and account setup.
- WhatsApp Business API Documentation — General reference on WhatsApp messaging APIs.
- n8n Documentation on Creating Custom Nodes — For understanding how nodes work internally.