Actions6
- Conversation Settings Actions
Overview
This node manages conversation settings for Zalo chats, specifically allowing users to pin or unpin conversations. It is useful in scenarios where you want to programmatically organize chat threads by marking important ones as pinned or removing the pin from others. For example, a user might want to highlight certain group or user conversations to keep them easily accessible.
The "Set Pinned Conversations" operation lets you specify which conversations (by their IDs) should be pinned or unpinned, and whether these are user or group threads.
Properties
| Name | Meaning |
|---|---|
| Pinned | Choose true to pin the specified conversations, or false to unpin them. |
| Thread Type | The type of conversation thread: User (value 1) or Group (value 2). |
| Thread IDs | Comma-separated list of thread IDs to pin/unpin. These are user IDs or group IDs depending on thread type. |
| Thread ID (gợi ý) | Suggested thread ID automatically taken from input data if no Thread IDs are provided. Useful for quick defaults. |
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 that sets the pinned status.
The node does not output binary data.
Example output JSON structure:
{
"status": "Thành công",
"debug": {
"input": {
"pinned": true,
"threadType": 1,
"threadIds": ["uid1", "uid2"]
},
"rawResponse": { /* API response object */ }
}
}
Dependencies
- Requires a valid Zalo API credential with cookie, IMEI, and user agent information.
- Uses an external library (
zca-js) to interact with the Zalo API. - The node expects the Zalo API credentials to be configured properly in n8n.
Troubleshooting
Error: "Vui lòng nhập ít nhất 1 Thread ID"
This means no thread IDs were provided. Make sure to enter 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 entered 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, it will return error details per item instead of stopping execution.
Links and References
- Zalo Official API Documentation (general reference for Zalo APIs)
- n8n Documentation for setting up credentials and using custom nodes