Z-API icon

Z-API

Send messages

Overview

This node, named "Z-API," is designed to send various types of messages through a messaging platform. Specifically, for the Send Message resource and the Send GIF operation, it allows users to send GIF media content to a specified phone number. This node supports sending other message types as well (text, audio, documents, images, stickers, videos, etc.), but here the focus is on sending GIFs.

Typical use cases include:

  • Automating marketing or customer engagement by sending GIFs to customers.
  • Sending dynamic visual content in chatbots or notification systems.
  • Enhancing communication with multimedia messages in workflows.

For example, you could configure this node to send a promotional GIF to a user's phone number after they complete a form or trigger an event.

Properties

Name Meaning
Phone The recipient's phone number in international format (e.g., 5511999999999).
URL or Base64 The URL or base64-encoded string of the GIF media to be sent.
Additional Fields Optional settings including:
- 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 (for threaded conversations).

Output

The node outputs a JSON array where each element corresponds to the response from the messaging API for each input item processed. The exact structure depends on the external API response but generally includes confirmation details about the sent message.

No binary data output is produced by this node; all outputs are JSON objects representing the result of the send operation.

Dependencies

  • Requires an API key credential for authenticating with the external messaging service (referred generically as "an API key credential").
  • The node uses an internal helper function (zapiApiRequest) to make HTTP requests to the messaging API.
  • No additional environment variables are explicitly required beyond the API credential.

Troubleshooting

  • Common issues:

    • Invalid phone number format may cause message sending to fail.
    • Incorrect or inaccessible media URL/base64 string can lead to errors.
    • Exceeding delay limits (delayMessage > 15 or delayTyping > 15) will not be accepted.
    • Using an unknown operation or resource will throw an error.
  • Error messages:

    • "The operation \"send-gif\" is not known!" — indicates the operation parameter was incorrect or unsupported.
    • "The resource \"send-message\" is not known!" — indicates the resource parameter was incorrect.
    • Network or authentication errors from the external API will be passed through; ensure the API key is valid and has proper permissions.
  • Resolution tips:

    • Verify phone numbers are in correct international format without spaces or special characters.
    • Confirm media URLs are publicly accessible or base64 strings are correctly encoded.
    • Use delays within allowed ranges.
    • Check API credentials and connectivity.

Links and References

Discussion