Actions10
Overview
This node integrates with the Z-API service to send various types of WhatsApp messages programmatically. Specifically, the "Send Audio" operation under the "Send Message" resource allows users to send audio files to a specified phone number via WhatsApp.
Common scenarios for this node include:
- Automating customer support by sending voice messages.
- Broadcasting audio announcements or alerts.
- Sharing audio content such as podcasts or music clips in workflows.
For example, a business could use this node to automatically send an audio greeting or instructions to new customers after they sign up.
Properties
| Name | Meaning |
|---|---|
| Instance ID | Your Z-API Instance ID used to identify your Z-API account 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). |
| URL or Base64 | The audio media source, either a direct URL or a base64 encoded string representing audio. |
| View Once | Boolean flag indicating if the audio message should be view-once (disappear after viewing). |
| Additional Fields | Optional extra settings: • Delay Message (seconds before sending) • Delay Typing (seconds showing typing status) • Message ID to Reply (to reply to a specific message) |
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 structure typically contains the result of the send message request, including success confirmation or error details.
If the message includes media, the output confirms the media was sent but does not contain the media itself.
No binary data is output by this node.
Dependencies
- Requires access to the Z-API WhatsApp messaging service.
- Needs valid credentials: Instance ID, Instance Token, and Client Token.
- Network connectivity to the Z-API endpoints.
- No additional environment variables are required beyond the provided credentials.
Troubleshooting
- Invalid Credentials: Errors related to authentication usually mean the Instance ID, Instance Token, or Client Token are incorrect or expired. Verify and update these credentials.
- Invalid Phone Number: Ensure the phone number is in the correct international format without spaces or special characters.
- Unsupported Operation: If an unknown operation is selected, the node throws an error. Confirm that "send-audio" is chosen for sending audio messages.
- Media Issues: If the audio URL is inaccessible or the base64 string is malformed, the message will fail. Check the media source validity.
- Delays Misconfiguration: Setting delay values outside the allowed range (1-15 seconds for message delay, 0-15 for typing delay) may cause errors.
- Reply Message ID: If replying to a message, ensure the message ID exists and is valid; otherwise, the API may reject the request.