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 is made.
  • Automating poll management workflows in Zalo groups or communities.

For example, after collecting votes for a set duration, you can use this node to lock the poll automatically, ensuring results remain unchanged.

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 a JSON object containing:

  • 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 structure:

{
  "success": true,
  "response": { /* API response details */ },
  "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 may cause authentication failures.
    • Providing a non-existent or incorrect poll ID will result in errors from the API.
    • Network connectivity problems can prevent communication with the Zalo API.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not initialize the API client due to missing or invalid credentials. Verify your Zalo API credential setup.
    • Errors related to poll locking typically indicate invalid poll IDs or insufficient permissions. Double-check the poll ID and ensure the authenticated user has rights to lock the poll.
    • If the node throws errors about processing input properties, ensure the poll ID is provided as a number and is required.
  • Resolution tips:

    • Confirm that the poll ID exists and is correct.
    • Refresh or re-enter your Zalo API credentials.
    • Check network access and firewall settings.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch executions.

Links and References

Discussion