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.
  • Managing group polls in Zalo by programmatically controlling their state.

Practical example:

  • After collecting votes for a group decision, use this node to lock the poll so no more votes can be added, ensuring the results remain final.

Properties

Name Meaning
ID bình chọn The numeric ID of the poll to lock

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 credentials in n8n is necessary for authentication.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials causing authentication failure.
    • Providing a non-existent or incorrect poll ID.
    • Network connectivity problems when calling the Zalo API.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Resolution: Verify that the Zalo API credentials are correctly set up and valid.
    • Errors related to invalid poll ID or API call failures will be thrown as node operation errors with descriptive messages.
    • If the node is configured to continue on fail, errors will be returned in the output JSON under the error field.

Links and References

Discussion