Zalo User icon

Zalo User

Quản lý người dùng Zalo

Overview

This node manages interactions with Zalo users, specifically providing operations related to user management on the Zalo platform. The "Undo Message" operation allows you to revoke or recall a previously sent message in a conversation thread. This is useful when you want to delete a message that was sent by mistake or contains incorrect information.

Practical scenarios include:

  • Automatically retracting messages sent in error.
  • Managing conversations by removing sensitive or outdated messages.
  • Implementing moderation tools that can undo inappropriate messages.

Properties

Name Meaning
Thread ID The identifier of the conversation thread where the message was sent.
Thread Type The type/category of the user or conversation thread (e.g., individual chat, group chat).
msgId The unique identifier of the message to be undone (revoked).
cliMsgId The client-side message ID associated with the message to be undone.

Output

The output JSON object contains:

  • status: A string indicating the success status, typically "Thành công" (meaning "Success").
  • response: The raw response from the Zalo API after attempting to undo the message. This may include details about the operation's result.

Example output structure:

{
  "status": "Thành công",
  "response": {
    // API response details here
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Zalo API via credentials that include authentication tokens such as cookies, device IMEI, and user agent strings.
  • The node depends on the external zca-js library for interacting with the Zalo API.
  • Proper configuration of the Zalo API credential within n8n is necessary to authenticate requests.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials leading to failed API login.
    • Incorrect threadId, msgId, or cliMsgId causing the undo operation to fail.
    • Network connectivity problems preventing communication with the Zalo API.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with the Zalo API. Verify your credentials and ensure they are correctly configured.
    • Errors returned from the Zalo API during the undo operation will be passed through. Check the message IDs and thread information for correctness.
  • Resolution tips:

    • Double-check all input parameters for accuracy.
    • Refresh or re-enter API credentials if authentication fails.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.

Links and References

Discussion