Zalo Send Message icon

Zalo Send Message

Gửi tin nhắn qua API Zalo sử dụng kết nối đăng nhập bằng cookie

Overview

This node operation "Gửi video tin nhắn" (Send video message) for the Zalo messaging platform allows users to send video messages to a specific thread, which can be either a user or a group chat. It supports sending a text message along with a video URL and optionally a thumbnail image URL. This is useful in scenarios where automated workflows need to share multimedia content via Zalo, such as marketing campaigns, customer support with video instructions, or broadcasting announcements.

Practical examples:

  • Sending a promotional video with a custom message to a customer support group.
  • Sharing a tutorial video link with a personalized note to an individual user.
  • Broadcasting event highlight videos to multiple group chats.

Properties

Name Meaning
Thread ID The unique identifier of the thread (chat) where the video message will be sent.
Type The type of the thread: 0 for User (individual chat), 1 for Group (group chat).
Message The text content accompanying the video message.
Video URL The URL pointing to the video file to be sent.
Thumbnail URL (Optional) The URL of the thumbnail image representing the video.

Output

The node outputs a JSON object containing:

  • success: Boolean indicating if the message was sent successfully.
  • response: The raw response from the Zalo API after sending the message.
  • threadId: The ID of the thread where the message was sent.
  • threadType: The type of the thread (user or group).
  • messageContent: The content of the message sent, including text and video details.
  • Additional fields related to the video info and any optimizations applied may also be included.

No binary data output is produced by this node; it strictly handles JSON responses.

Dependencies

  • Requires an active connection to the Zalo API using an API key credential configured in n8n.
  • Uses internal helper libraries for downloading and saving video and thumbnail files temporarily.
  • Node depends on proper authentication credentials and network access to Zalo's messaging service.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials causing authentication failures.
    • Incorrect thread ID or type leading to message delivery errors.
    • Video URL inaccessible or invalid format causing upload failure.
    • Thumbnail URL missing or invalid when provided.
  • Error messages:

    • "Zalo API not initialized": Indicates missing or invalid API credentials; verify credential setup.
    • "Cannot send typing event": Non-critical error logged if the node fails to send a typing indicator; usually safe to ignore.
    • "Video not found or invalid": Occurs if the video URL cannot be downloaded or processed; check URL validity.
    • General network or API errors: Check internet connectivity and Zalo API status.
  • Resolutions:

    • Ensure all required properties are correctly set and valid.
    • Confirm API credentials are up-to-date and have necessary permissions.
    • Validate URLs before running the workflow.
    • Review logs for detailed error information.

Links and References

Discussion