Overview
This node allows sending a video message through the Zalo messaging platform using its API, authenticated via a cookie-based login. It is useful for automating video sharing in conversations on Zalo, either with individual users or groups. Typical use cases include marketing campaigns, customer support, or broadcasting video content to multiple recipients.
For example, you can send a promotional video with a thumbnail and an optional text message to a specific user or group thread identified by its ID. The node supports specifying video metadata such as duration, dimensions, and message TTL (time-to-live).
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the conversation thread where the video will be sent. |
| Type | The type of thread: "User" (individual chat) or "Group" (group chat). |
| Video URL | Publicly accessible URL of the video file to be sent. |
| Thumbnail URL | Publicly accessible URL of the video's thumbnail image. |
| Duration (ms) | Length of the video in milliseconds; must be greater than zero. |
| Width | Width of the video in pixels (default 1280). |
| Height | Height of the video in pixels (default 720). |
| Message | Optional accompanying text message to send along with the video. |
| TTL (ms) | Time-to-live for the message in milliseconds (default 3600000 ms = 1 hour). |
| Mentions | Collection defining mentions within the message text, including User ID, position, and length. |
Output
The node outputs an array of JSON objects, each corresponding to an input item processed. Each output object contains:
success: Boolean indicating if the video was sent successfully.response: The raw response from the Zalo API after sending the video.threadId: The ID of the thread where the video was sent.threadType: The type of thread (user or group).videoOptions: The parameters used to send the video, including URLs, duration, dimensions, message, TTL, and mentions.
If an error occurs and the node is configured to continue on failure, the output will contain:
success: falseerror: Error message describing what went wrong.
The node does not output binary data.
Dependencies
Requires an API key credential that provides:
- A valid Zalo session cookie.
- Device IMEI string.
- User agent string.
Uses the external
zca-jslibrary to interact with the Zalo API.The node requires proper configuration of these credentials in n8n before execution.
Troubleshooting
- Failed to initialize Zalo API: Indicates invalid or expired credentials (cookie, IMEI, or user agent). Re-authenticate or update credentials.
- Video URL or Thumbnail URL missing: These are required fields; ensure they are provided and publicly accessible.
- Duration must be greater than 0: The video duration must be a positive number.
- Cannot send typing event: Non-critical warning if the typing indicator cannot be sent; the video may still be delivered.
- General errors during sending: Check network connectivity, validity of thread IDs, and API limits.
To resolve issues, verify all input parameters, ensure credentials are current, and check the Zalo API status.
Links and References
- Zalo Official API Documentation
- n8n Documentation
- zca-js GitHub Repository (Note: Replace with actual repo if available)