z-api by @jaimeflneto icon

z-api by @jaimeflneto

Interact with Z-API to send WhatsApp messages

Overview

This node sends an image message via WhatsApp using the Z-API service. It is useful for automating the sending of images to specific phone numbers, optionally including captions and message options such as typing delay, message delay, and replying to a specific message. Practical applications include customer support, marketing campaigns, and automated notifications with visual content.

Use Case Examples

  1. Sending a product image to a customer with a caption describing the product.
  2. Sending an event flyer image to a group of contacts with a delay to simulate typing.
  3. Replying to a previous message with an image attachment.

Properties

Name Meaning
Phone Number The recipient's phone number including country code, formatted as digits only without any special characters or spaces.
Image URL The URL of the image to be sent to the recipient.
Caption Optional text caption to accompany the image message.
Options Additional message sending options such as delay for typing status, delay before sending the message, and replying to a specific message ID.

Output

JSON

  • phone - The phone number to which the image was sent.
  • imageUrl - The URL of the image that was sent.
  • caption - The caption text sent with the image, if any.
  • messageId - The unique identifier of the sent message returned by the API.
  • status - The status of the message sending operation (e.g., success or failure).

Dependencies

  • Requires an API key credential for Z-API to authenticate and send WhatsApp messages.

Troubleshooting

  • Ensure the phone number is correctly formatted with country code and contains only digits; otherwise, the message may fail to send.
  • Verify that the image URL is accessible and points to a valid image file; invalid URLs will cause errors.
  • Delays for typing and message sending must be within the allowed range (0-15 seconds); values outside this range may be ignored or cause errors.
  • If replying to a message, ensure the replyMessageId is valid and corresponds to an existing message ID.

Discussion