Z-API WhatsApp icon

Z-API WhatsApp

Custom operations

Overview

This node enables sending WhatsApp messages through the Z-API service, specifically supporting a variety of message types including text, images, documents, audio, video, locations, contacts, buttons, carousels, and more. The "Send Image With Buttons" operation allows users to send an image accompanied by interactive buttons, which recipients can tap to trigger predefined actions or replies.

Common scenarios for this node include:

  • Marketing campaigns where you want to showcase a product image with quick-reply buttons.
  • Customer support interactions that provide options directly on an image message.
  • Interactive notifications or surveys sent via WhatsApp with visual context and actionable buttons.

Example: Sending a promotional image of a washing machine with buttons labeled "Buy Now", "More Info", and "Contact Support" to engage customers interactively.

Properties

Name Meaning
Instance Your Z-API instance ID used to identify your WhatsApp API session.
Token Your Z-API token for authenticating API requests.
Client Token Your Z-API client token for additional authentication header required by the API.
Phone The recipient's phone number or group ID to which the message will be sent.
Message The text message content sent alongside the image and buttons.
Image URL The URL of the image to be sent with the buttons.
Buttons A collection of interactive buttons attached to the image message. Each button has:
- Button ID: Unique identifier for the button.
- Button Label: Text displayed on the button.

Output

The node outputs a JSON array containing the response from the Z-API service for each input item processed. The JSON typically includes details about the success or failure of the message sending request.

No binary data output is produced by this operation.

Dependencies

  • Requires access to the Z-API WhatsApp service.
  • Needs three credentials: an instance ID, a token, and a client token for authenticating API calls.
  • The node makes HTTP POST requests to the Z-API endpoints.
  • Proper network connectivity to https://api.z-api.io is necessary.

Troubleshooting

  • Invalid Credentials: If the instance ID, token, or client token are incorrect or expired, the API will reject requests. Verify and update these credentials.
  • Invalid Phone Number: Ensure the phone number or group ID is correctly formatted and registered on WhatsApp.
  • Button Configuration Errors: Each button must have a unique ID and label; missing or duplicate IDs may cause errors.
  • Image URL Issues: The image URL must be publicly accessible and valid. Broken links or unsupported formats will cause failures.
  • API Rate Limits: Excessive requests might be throttled by Z-API. Implement retries or backoff strategies if needed.
  • Error Messages: The node throws errors if the operation is not supported or parameters are missing. Check error messages for hints on what property or value caused the issue.

Links and References

Discussion