Z-API WhatsApp icon

Z-API WhatsApp

Custom operations

Overview

This node enables sending audio messages via WhatsApp using the Z-API service. It is designed to send an audio file from a specified URL to a target phone number or group ID on WhatsApp. This functionality is useful for automating voice message delivery in customer support, marketing campaigns, or notifications where audio content is preferred over text.

For example, a business could use this node to send recorded announcements or greetings to customers automatically, or a support team might send voice instructions to users.

Properties

Name Meaning
Instance The Z-API instance ID identifying your WhatsApp API instance.
Token The Z-API token used for authenticating API requests.
Client Token The client token required by Z-API for additional authentication.
Phone The recipient's phone number or group ID where the audio will be sent.
Audio URL The URL of the audio file to send (must be accessible and supported by WhatsApp).

Output

The node outputs a JSON object containing the response from the Z-API service after attempting to send the audio message. This typically includes status information about the request, such as success confirmation or error details.

No binary data output is produced by this operation.

Dependencies

  • Requires access to the Z-API WhatsApp service.
  • Needs valid credentials: instance ID, token, and client token for authentication.
  • The audio file must be hosted at a publicly accessible URL.
  • Network connectivity to https://api.z-api.io is necessary.
  • No additional environment variables are required beyond the provided credentials.

Troubleshooting

  • Common issues:

    • Invalid or expired tokens may cause authentication failures.
    • Incorrect phone number or group ID format can result in message delivery errors.
    • The audio URL must be reachable and point to a supported audio format; otherwise, the message will not send.
    • Network issues or API downtime can cause request failures.
  • Error messages:

    • Authentication errors usually indicate invalid tokens; verify and update credentials.
    • "Unsupported operation" errors occur if the node is misconfigured with an unsupported resource or operation.
    • HTTP errors from the API (e.g., 400 or 500 status codes) should be checked against Z-API documentation for specific causes.

Links and References

Discussion