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 allows users to interact with the Zalo messaging platform by sending various types of messages and performing actions such as adding reactions to messages. Specifically, the "Thả Reaction" (Add Reaction) operation lets you add a reaction emoji to a specific message within a chat thread on Zalo. This is useful for automating engagement or feedback on messages in personal or group conversations.

Practical examples include:

  • Automatically reacting with a "Like" or "Heart" emoji to important messages.
  • Adding a "Pray" or "Sad" reaction based on sentiment analysis results.
  • Enhancing chatbot interactions by acknowledging user messages with appropriate reactions.

Properties

Name Meaning
ID cuộc trò chuyện / Thread ID The unique identifier of the chat thread containing the message to react to.
Loại cuộc trò chuyện The type of conversation: either "Cá nhân" (Personal/User) or "Nhóm" (Group).
ID Tin nhắn / Message ID The unique identifier of the message to which the reaction will be added.
Client Message ID The client-side message ID corresponding to the message to react to.
Reaction The emoji reaction to add to the message. Options are: ❤️ (HEART), 👍 (LIKE), 😂 (HAHA), 😮 (WOW), 😢 (SAD), 😠 (ANGRY), 🙏 (PRAY).

Output

The output JSON contains:

  • success: A boolean indicating if the reaction was successfully added.
  • response: The raw response from the Zalo API after attempting to add the reaction.

Example output structure:

{
  "success": true,
  "response": { /* Zalo API response object */ }
}

No binary data is output by this operation.

Dependencies

  • Requires valid Zalo API credentials including a cookie-based authentication token, device IMEI, and user agent string.
  • The node uses an internal Zalo API client initialized with these credentials.
  • No additional external services beyond the Zalo API are required.

Troubleshooting

  • Common issues:

    • Invalid or expired Zalo API credentials will cause initialization failure.
    • Providing an invalid reaction value not listed in the options will throw an error.
    • Missing required parameters like Thread ID, Message ID, or Client Message ID will cause errors.
  • Error messages and resolutions:

    • "Failed to initialize Zalo API. Check your credentials." — Verify that the provided API credentials are correct and have not expired.
    • "Invalid reaction: <reaction>" — Ensure the reaction parameter matches one of the supported emojis.
    • "Zalo API not initialized" — Confirm that credentials are properly set and accessible by the node.
    • General network or API errors should be checked by reviewing the Zalo API status and connectivity.

Links and References

Discussion