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, preventing further votes or changes. This is useful in scenarios where a poll has reached its deadline or when the poll creator wants to finalize results.

Practical examples:

  • Automatically locking a poll after a certain time period.
  • Locking a poll based on external triggers or workflow conditions.
  • Managing poll lifecycle programmatically within automated workflows.

Properties

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

Output

The node outputs a JSON object for each input item processed, structured as follows:

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

Example output JSON structure:

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

No binary data output is produced by this node.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
  • 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 to authenticate requests.

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."
      Indicates missing or invalid credentials; verify and update the Zalo API credential.
    • Errors related to poll ID not found or invalid parameters will be returned from the API and surfaced by the node.
    • If the node encounters an error but "Continue On Fail" is enabled, it will return the error message in the output JSON under error.

To resolve errors, ensure:

  • Credentials are correctly set up and valid.
  • The poll ID exists and is accessible.
  • Network access to Zalo API endpoints is available.

Links and References

Discussion