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. This functionality is useful in scenarios where you want to automate sending voice notes, music clips, podcasts, or any audio content through WhatsApp as part of your workflow.

Practical examples include:

  • Sending automated voice alerts or notifications.
  • Distributing audio marketing materials or announcements.
  • Sharing recorded instructions or messages in customer support automation.

Properties

Name Meaning
Instance The Z-API instance ID used to identify your WhatsApp session.
Token The authentication token for accessing the Z-API instance.
Client Token A client-specific token required by Z-API for authorization.
Phone The recipient's phone number or group ID where the audio will be sent.
Audio URL The URL pointing to the audio file that will be sent via WhatsApp.

Output

The node outputs a JSON object containing the response from the Z-API 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 node makes HTTP POST requests to Z-API endpoints.
  • Ensure network connectivity to https://api.z-api.io.

Troubleshooting

  • Common issues:

    • Invalid or expired tokens may cause authentication failures.
    • Incorrect phone number or group ID format can result in delivery errors.
    • Unreachable or invalid audio URL will prevent the audio from being sent.
    • Network issues blocking access to Z-API endpoints.
  • Error messages:

    • Authentication errors usually indicate problems with the provided tokens; verify and update them.
    • "Operation not supported" errors occur if the operation or resource parameters are incorrect.
    • 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