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 video URL along with an optional thumbnail and a text message as the content of the message.

Typical use cases include:

  • Automating video message delivery in customer support chats.
  • Broadcasting video announcements or updates to groups.
  • Sending personalized video messages in marketing campaigns.

For example, a business could use this node to automatically send a product demo video to a customer after they request information via Zalo.

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 chat.
Message The textual 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 to display alongside the video message.

Output

The node outputs JSON objects for each item processed, 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: An object representing the message details including the text message and video URLs.
  • In case of failure, the output includes an error field describing the issue.

No binary data is output by this node.

Dependencies

  • Requires valid Zalo API credentials including authentication tokens (cookie, IMEI, user agent).
  • Uses helper utilities for downloading and saving images/videos temporarily.
  • Relies on external HTTP requests to Zalo's messaging API endpoints.
  • Node requires proper configuration of these credentials within n8n to authenticate API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired Zalo API credentials causing authentication failures.
    • Incorrect or inaccessible video URL leading to download errors.
    • Missing required parameters such as Thread ID or Message.
    • Network connectivity problems when calling Zalo API.
  • Error messages:

    • "Zalo API not initialized": Indicates failure to create a valid API client instance; check credentials.
    • "Failed to download video": The provided video URL could not be fetched; verify URL accessibility.
    • "Send typing event User" or similar logs indicate attempts to notify typing status; failures here usually do not block sending but may indicate connection issues.
    • Errors thrown by the node include detailed messages and item index for easier debugging.
  • Resolutions:

    • Ensure all required properties are correctly set.
    • Verify that the video and thumbnail URLs are publicly accessible.
    • Refresh or reconfigure Zalo API credentials.
    • Check network access and firewall settings.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions without runtime execution.

Discussion