Z-API icon

Z-API

Send messages

Overview

This node allows sending various types of messages through the Z-API messaging service. Specifically, for the Send Image operation under the Send Message resource, it sends an image to a specified phone number. The image can be provided either as a URL or as a Base64-encoded string. Additional options include adding a caption and marking the image as "view once," meaning the recipient can only view the image one time.

Common scenarios where this node is useful include:

  • Sending promotional images or product photos to customers.
  • Sharing event flyers or invitations via WhatsApp or similar messaging platforms.
  • Delivering visual content in customer support or notification workflows.

Example: Automatically send a product image with a caption to a customer after they place an order.

Properties

Name Meaning
Phone The recipient's phone number in international format (e.g., 5511999999999).
URL or Base64 The image to send, either as a direct URL or a Base64-encoded string representing the image.
View Once Boolean flag indicating if the image should be viewable only once by the recipient.
Caption Optional text caption to accompany the image.
Additional Fields Collection of optional parameters:
• 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: ID of a message to reply to.

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 exact structure depends on the API response but generally includes confirmation details about the sent message.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Z-API messaging service.
  • Needs an API key credential configured in n8n for authentication with Z-API.
  • Network access to the media URLs if using URL-based images.

Troubleshooting

  • Invalid phone number format: Ensure the phone number is in the correct international format without spaces or special characters.
  • Unsupported operation error: If the operation name is misspelled or unsupported, the node throws an error stating the operation is unknown.
  • Missing required fields: The node requires phone and urlOrBase64 fields; missing these will cause errors.
  • Media loading issues: If the image URL is inaccessible or invalid, the message may fail to send.
  • Delays not working as expected: Delays must be within allowed ranges (typing delay 0–15 seconds, message delay 1–15 seconds).

To resolve errors, verify all required inputs, check API credentials, and ensure media URLs are reachable.

Links and References

Discussion