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.
  • Use poll data to update dashboards or notify users of poll outcomes.

Properties

Name Meaning
ID bình chọn The numeric ID of the poll to retrieve information for.

Output

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

  • success: Boolean indicating if the API call was successful.
  • response: The detailed poll data returned from the Zalo API, including questions, options, votes, and other metadata.
  • poll_id: The ID of the poll that was queried.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials, including authentication cookies, device IMEI, and user agent strings.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n beforehand.
  • No additional environment variables are explicitly required beyond credential setup.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Missing 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. Verify your API key and cookie settings.
    • Errors related to poll ID input indicate that the poll ID parameter is either missing or malformed. Ensure it is provided as a number.
    • If the node throws errors during execution but continueOnFail is enabled, it will return error details per item instead of stopping the workflow.

Links and References

Discussion