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 messages, stickers, voice messages, and reactions through the Zalo API. Specifically, the "Thả Reaction" operation lets you add a reaction emoji (like ❤️, 👍, 😂, etc.) to an existing message in a chat thread. This is useful for automating engagement or feedback on messages within personal or group conversations on Zalo.

Practical examples include:

  • Automatically reacting with a "Like" or "Heart" emoji to important messages.
  • Adding a "Pray" or "Sad" reaction based on sentiment analysis of incoming messages.
  • Enhancing chatbot interactions by programmatically acknowledging user messages with 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 chat: either "Cá nhân" (Personal/User) or "Nhóm" (Group).
ID Tin nhắn / Message ID The unique identifier of the specific 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: ❤️ (HEART), 👍 (LIKE), 😂 (HAHA), 😮 (WOW), 😢 (SAD), 😠 (ANGRY), 🙏 (PRAY)

Output

The output JSON contains:

  • success: Boolean indicating if the reaction was successfully added.
  • response: The raw response from the Zalo API after adding 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 authenticated via cookie, IMEI, and user agent.
  • The node uses the Zalo API client library internally to perform actions.
  • Proper configuration of the Zalo API credential with necessary authentication details is mandatory.

Troubleshooting

  • Common issues:

    • Invalid or expired Zalo API credentials will cause initialization failure.
    • Providing incorrect or missing message IDs (msgId or cliMsgId) will result in errors.
    • Using an unsupported reaction value will throw an error indicating invalid reaction.
  • Error messages:

    • "Failed to initialize Zalo API. Check your credentials." — Verify that the API credentials are correctly set and valid.
    • "Invalid reaction: <reaction>" — Ensure the reaction value is one of the supported options.
    • "Zalo API not initialized" — Indicates the API client failed to authenticate; check credentials again.
  • To resolve errors, confirm all required fields are provided, credentials are current, and reaction values are valid.

Links and References

Discussion