Zalo User icon

Zalo User

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

Zalo User → Đánh Dấu Tin Nhắn Chưa Đọc

AI-generated

Overview

This node manages Zalo user interactions, specifically for marking messages as read or unread within a conversation thread. It is useful in scenarios where you want to programmatically update the read status of messages in Zalo chats, such as automating message management workflows or integrating Zalo messaging status updates into other systems.

For example, you can use this node to:

  • Mark all messages in a specific chat thread as read after processing them.
  • Flag certain conversations as unread to remind users to revisit them later.

Properties

Name Meaning
Thread ID The unique identifier of the user or conversation thread whose messages will be marked.
Thread Type The type/category of the user or thread (e.g., individual chat, group chat).

Output

The node outputs a JSON object containing:

  • status: A string indicating success ("Thành công").
  • response: The raw response from the Zalo API confirming the action taken (marking messages as read or unread).

No binary data output is produced by this operation.

Example output JSON:

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

Dependencies

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

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Incorrect Thread ID or Thread Type values can lead to errors or no effect.
    • Network connectivity problems might prevent successful API calls.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates missing or invalid Zalo API credentials. Verify and re-enter your API key and related authentication details.
    • Errors returned from the Zalo API (e.g., invalid thread ID) will be passed through; check the error message for specifics.
  • To handle errors gracefully, enable the "Continue On Fail" option in the node settings to allow workflow execution to proceed despite individual item errors.

Links and References

Discussion