Zalo Reaction icon

Zalo Reaction

Add reaction to a Zalo message

Add Reaction

AI-generated

Overview

This node allows users to add emoji reactions to messages within Zalo conversations, either in one-on-one chats or group threads. It is useful for automating interactions on the Zalo platform by programmatically reacting to specific messages with a chosen emoji. For example, you can automatically add a "Like" reaction to important notifications or respond with a "Thanks" emoji when receiving certain messages.

Properties

Name Meaning
Thread ID The identifier of the conversation (user or group) containing the message to react to.
Thread Type The type of conversation: User (0) or Group (1).
Message ID The identifier of the message to which the reaction will be added.
Emoji The emoji reaction code to add. Options include various predefined emojis such as Heart, Like, Haha, Wow, Angry, Kiss, Tears of Joy, and many others. There is also a "Custom..." option to specify a manual emoji code.
Custom Emoji Code When "Custom..." is selected for Emoji, this field allows entering a custom emoji reaction code manually.

Output

The node outputs a JSON object for each input item processed, structured as follows:

  • success: Boolean indicating whether the reaction was successfully added.
  • response: The raw response from the Zalo API after adding the reaction.
  • messageId: The ID of the message reacted to.
  • emoji: The emoji code used for the reaction.
  • threadId: The ID of the thread where the message resides.
  • threadType: The type of the thread (User or Group).

If an error occurs, the output JSON includes:

  • success: false
  • error: The error message describing what went wrong.

Dependencies

  • Requires valid Zalo API credentials including cookie, device IMEI, and user agent information.
  • Uses an external Zalo API client library to perform login and add reactions.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • Login errors: If the node cannot initialize the Zalo API client due to invalid or expired credentials, it throws an error prompting to check the credentials.
  • Missing required fields: Errors occur if Message ID or Thread ID are missing or empty. Users should ensure these values are provided either directly or mapped from previous node outputs.
  • Unsupported operations: Only the "Add Reaction" operation is supported; specifying any other operation results in an error.
  • Custom emoji code missing: If "Custom..." emoji is selected but no custom code is provided, the node throws an error asking to enter the custom emoji code.
  • To handle errors gracefully, enable "Continue On Fail" in the node settings to process subsequent items even if some fail.

Links and References

Discussion