Actions10
Overview
This node integrates with the Z-API service to send various types of WhatsApp messages programmatically. Specifically, for the Send Message resource and Send Options List operation, it allows sending a message containing a list of selectable options presented as buttons. This is useful in scenarios where you want to provide interactive choices to the recipient, such as menus, surveys, or quick replies.
Practical examples include:
- Sending a customer support menu with options like "Billing", "Technical Support", and "Sales".
- Presenting a product catalog with selectable categories.
- Conducting polls or feedback collection by letting users pick from predefined options.
Properties
Name | Meaning |
---|---|
Instance ID | Your Z-API Instance ID used to identify your WhatsApp API instance. |
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 main text message content sent above the options list. |
Button Label | The label displayed on the button that reveals the options list (e.g., "See options"). |
Options Title | The title shown at the top of the options list (e.g., "Options available"). |
Options | A collection of option items, each with: |
- Option Title: The visible title of the option. | |
- Option Description: Additional descriptive text for the option. | |
- Option ID: An identifier for the option (used internally or for tracking). | |
Additional Fields | Optional extra settings including: |
- Delay Message: Seconds to wait before sending the message (1-15). | |
- Delay Typing: Seconds to show "Typing..." status before sending (0-15). | |
- Message ID to Reply: If set, the message will be sent as a reply to this message ID. |
Output
The node outputs an array of JSON objects corresponding to each input item processed. Each output object contains the response from the Z-API service after attempting to send the message. The exact structure depends on the API response but typically includes status information about the message delivery.
No binary data output is produced by this operation.
Dependencies
- Requires access to the Z-API WhatsApp messaging service.
- Needs three credentials configured in n8n: an instance ID, an instance token, and a client token for authenticating API requests.
- Network connectivity to the Z-API endpoint is necessary.
Troubleshooting
Common Issues:
- Invalid or missing credentials (Instance ID, Instance Token, Client Token) will cause authentication failures.
- Incorrect phone number format may result in message delivery errors.
- Providing empty or malformed options list can cause the API to reject the request.
- Exceeding delay limits (more than 15 seconds) will not be accepted.
Error Messages:
"The operation \"send-option-list\" is not known!"
indicates a misconfiguration or unsupported operation name."The resource \"send-message\" is not known!"
suggests the resource parameter is incorrect.- API errors returned from Z-API will be included in the output if "Continue On Fail" is enabled; otherwise, they will stop execution.
Resolutions:
- Double-check all credential values and ensure they are current and valid.
- Validate phone numbers follow the required international format without symbols.
- Ensure all required fields (Text, Button Label, Options Title, Options) are filled.
- Use the Additional Fields only within allowed ranges.
Links and References
- Z-API Official Documentation (for detailed API usage and credential setup)
- WhatsApp Interactive Messages Guide (conceptual reference for options lists)