Zalo Poll icon

Zalo Poll

Quản bình chọn Zalo

Overview

This node integrates with the Zalo Poll API to manage polls within the Zalo platform. Specifically, the "Khóa bình chọn" (Lock Poll) operation allows users to lock an existing poll by its ID, preventing further votes or changes.

Common scenarios for this node include:

  • Finalizing a poll after a voting period ends.
  • Preventing additional votes once a decision deadline is reached.
  • Automating poll management workflows in group chats or communities on Zalo.

Practical example:

  • After collecting votes for a scheduled time, use this node to lock the poll automatically, ensuring no more votes are accepted and results can be processed securely.

Properties

Name Meaning
ID bình chọn The numeric ID of the poll to lock. This identifies which poll will be locked.

Output

The node outputs JSON data with the following structure:

  • success: A boolean indicating if the lock operation was successful.
  • response: The raw response from the Zalo API regarding the lock action.
  • poll_id: The ID of the poll that was locked.

Example output JSON:

{
  "success": true,
  "response": { /* API response object */ },
  "poll_id": 123456
}

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential with cookie, 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 before using this node.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Providing a non-existent or incorrect poll ID will result in errors from the Zalo API.
    • Missing required parameters like the poll ID will cause the node to throw validation errors.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not initialize the Zalo API client due to missing or invalid credentials. Check your credential setup.
    • Errors related to poll locking typically come from the API response; ensure the poll ID exists and you have permission to modify it.
    • If the node throws "Lỗi xử lý các lựa chọn" or similar, it indicates issues parsing input parameters—verify all inputs are correctly formatted.

Links and References

Discussion