Zalo Conversation Settings icon

Zalo Conversation Settings

Quản lý cài đặt hội thoại Zalo

Overview

This node manages conversation settings for Zalo chats, specifically allowing users to set or unset pinned conversations among other conversation-related configurations. The "Set Pinned Conversations" operation lets you pin or unpin one or more conversations (threads) by specifying their IDs and type (user or group). This is useful for prioritizing important chats in the Zalo app interface.

Practical examples:

  • Pinning a list of user conversations so they always appear at the top of your chat list.
  • Unpinning group conversations that are no longer relevant.
  • Automating chat management workflows where certain conversations need to be highlighted or deprioritized based on external triggers.

Properties

Name Meaning
Pinned Choose true to pin the specified conversations, or false to unpin them.
Thread Type The type of conversation thread: User (1) or Group (2).
Thread IDs Comma-separated list of thread IDs to pin/unpin. For users, use user IDs; for groups, group IDs.
Thread ID (gợi ý) Suggested thread ID automatically taken from input data if available (uidFrom, gid, or idTo). Used as fallback if Thread IDs is empty.

Output

The output JSON contains:

  • status: A string indicating success ("Thành công").
  • debug.input: An object showing the input parameters used (pinned, threadType, threadIds).
  • debug.rawResponse: The raw response returned from the underlying API call to set pinned conversations.

Example output structure:

{
  "status": "Thành công",
  "debug": {
    "input": {
      "pinned": true,
      "threadType": 1,
      "threadIds": ["uid1", "uid2"]
    },
    "rawResponse": { /* API response object */ }
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Zalo API credential with cookie, IMEI, and user agent information.
  • Uses an external Zalo API client library (zca-js) to perform operations.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • Error: "Vui lòng nhập ít nhất 1 Thread ID"
    This means no thread IDs were provided. Ensure you specify at least one valid user or group ID in the "Thread IDs" property or provide a valid suggestion in "Thread ID (gợi ý)".

  • Error: "Có vẻ bạn đã nhập msgId. Hãy dùng uid (User) hoặc gid (Group) thay vì msgId."
    Indicates that a message ID was mistakenly used instead of a user or group ID. Use the correct thread identifiers.

  • No API instance found error
    Usually caused by invalid or missing credentials. Verify that the Zalo API credential is correctly set up with valid cookie, IMEI, and user agent values.

  • If the node fails but "Continue On Fail" is enabled, errors will be returned in the output JSON under the error field for each failed item.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion