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. It supports sending text, media files (such as videos, images, audio, documents, GIFs, stickers), location data, contacts, polls, and events. The node is particularly useful for automating communication workflows where different message formats need to be sent programmatically.

For the Send Video operation specifically, the node sends a video message to a specified phone number. Users can provide the video either as a URL or as a Base64-encoded string. Additional options include adding a caption and marking the video as "view once," meaning the recipient can view it only one time.

Practical examples:

  • Sending promotional video clips to customers.
  • Sharing tutorial or demo videos automatically in response to user actions.
  • Broadcasting event highlight videos to a contact list.

Properties

Name Meaning
Phone The recipient's phone number in international format (e.g., 5511999999999).
URL or Base64 The video content to send, provided as a direct URL or a Base64-encoded string.
Caption Optional text caption accompanying the video message.
View Once Boolean flag indicating if the video should be viewable only once by the recipient.
Additional Fields Collection of optional parameters:
- Delay Message Number of seconds to wait before sending the message (1 to 15 seconds).
- Delay Typing Number of seconds to show "Typing..." status before sending the message (0 to 15 seconds).
- Message ID to Reply ID of an existing message to which this video message will be sent as a reply.

Output

The node outputs a JSON array where each element corresponds to the result of sending a message for each input item. The structure of each output object depends on the API response but generally includes confirmation details about the sent message.

No binary data output is produced by this node; all outputs are JSON-formatted metadata or status information related to the sent message.

Dependencies

  • Requires an API key credential for authenticating with the external messaging service.
  • The node uses an HTTP POST request to send messages via the external API.
  • No additional environment variables are explicitly required beyond the API authentication setup.

Troubleshooting

  • Common issues:

    • Invalid phone number format may cause message sending to fail.
    • Providing an invalid or inaccessible URL/Base64 string for the video will result in errors.
    • Exceeding delay limits (more than 15 seconds) will likely cause validation errors.
    • Using an unknown operation or resource name triggers explicit errors.
  • Error messages:

    • "The operation \"send-video\" is not known!" — indicates a typo or unsupported operation; verify the operation name.
    • "The resource \"send-message\" is not known!" — indicates an incorrect resource name; ensure "send-message" is used.
    • API errors returned from the external service will be passed through; check API credentials and network connectivity.
  • To resolve errors, verify all input parameters, especially phone numbers and media URLs/Base64 strings, and ensure valid API credentials are configured.

Links and References

  • n8n Documentation – General guidance on creating and using custom nodes.
  • Messaging platform API documentation (specific to the external service used) – for detailed info on message formats and limitations.

Discussion