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. It allows users to create new polls, retrieve detailed information about existing polls, and lock polls to prevent further voting. This is useful for automating poll management in group chats or communities on Zalo, enabling workflows such as gathering opinions, conducting surveys, or managing event feedback.

For the specified operation "Lấy thông tin bình chọn" (Get poll information), the node fetches detailed data about a particular poll by its ID. This can be used to display poll results, analyze responses, or trigger actions based on poll status.

Practical example:

  • Automatically retrieve poll details after a poll ends to summarize results in a report.
  • Use poll information to decide whether to send reminders or close the poll.

Properties

Name Meaning
ID bình chọn The numeric ID of the poll to retrieve information for. This identifies which poll's details will be fetched.

Output

The node outputs an array of items, each containing a json object with the following structure for the "getPoll" operation:

  • success: A boolean indicating if the request was successful.
  • response: The detailed poll data returned from the Zalo API. This includes all relevant poll information such as question, options, votes, status, etc.
  • poll_id: The ID of the poll that was requested.

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.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Providing a non-existent or incorrect poll ID will result in errors or empty responses.
    • Network connectivity problems can prevent API calls from succeeding.
  • 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 API key setup.
    • Errors related to poll retrieval will typically include the API error message. Ensure the poll ID exists and is accessible.
    • If the node is set to continue on fail, errors will be returned in the output JSON under the error field for each failed item.

Links and References

Discussion