Zalo Pin Message icon

Zalo Pin Message

Ghim/bỏ ghim cuộc trò chuyện trong Zalo

Overview

This node allows users to manage conversation pins within a messaging platform. It supports three main operations:

  • Pin Conversation: Mark a specific conversation (thread) as pinned, making it easier to access or highlight.
  • Unpin Conversation: Remove the pin from a specific conversation.
  • Get Pinned Conversations: Retrieve a list of all conversations currently pinned.

This node is useful in scenarios where users want to programmatically organize their chat threads by pinning important conversations or cleaning up pinned lists. For example, a user could automate pinning customer support chats for quick reference or unpin old group chats after an event concludes.

Properties

Name Meaning
Thread ID The unique identifier of the conversation thread to pin or unpin.
Thread Type The type of conversation: either "User" (one-on-one chat) or "Group" (group chat).

The Thread ID and Thread Type properties are required when performing pin or unpin operations. They specify which conversation to target.

Output

The node outputs JSON data with the following structure depending on the operation:

  • Pin Conversation / Unpin Conversation:

    {
      "success": true,
      "operation": "pinConversation" | "unpinConversation",
      "threadId": "string",
      "threadType": "user" | "group",
      "result": {
        "success": true,
        "result": "...",          // API response details
        "methodUsed": "pinConversation" | "unpinConversation",
        "parameters": ["threadId", true|false],
        "debug": {
          "threadId": "string",
          "threadType": "user" | "group",
          "apiResult": "..."     // Raw API result for debugging
        }
      }
    }
    
  • Get Pinned Conversations:

    {
      "success": true,
      "operation": "getPinnedConversations",
      "conversations": [...],    // Array of pinned conversation objects
      "version": "string|null",  // Version info if available
      "methodUsed": "getPinConversations",
      "debug": {
        "apiResult": "..."       // Raw API result for debugging
      }
    }
    

If an error occurs, the output will contain:

{
  "success": false,
  "error": "Error message"
}

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authentication with the messaging platform.
  • Uses an external library (referred to as Zalo in code) to interact with the messaging service's API.
  • The node expects valid session cookies, device IMEI, and user agent strings from the credentials to authenticate API calls.
  • No additional environment variables are explicitly required beyond the API credential.

Troubleshooting

  • Common Issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Incorrect or empty Thread ID will lead to errors when pinning/unpinning.
    • Network issues or API changes may cause unexpected failures.
  • Error Messages:

    • "Missing cookie": Indicates that the required authentication cookie was not found in credentials. Ensure the API key credential is properly configured.
    • Errors during pin/unpin attempts often include the original API error message; check that the Thread ID and Thread Type are correct.
    • If the node throws a generic operation error, verify network connectivity and API availability.
  • Resolution Tips:

    • Double-check input properties for correctness.
    • Refresh or reauthenticate API credentials if sessions expire.
    • Review debug output included in the node's response for detailed API error information.

Links and References


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

Discussion