Zalo Poll icon

Zalo Poll

Quản bình chọn Zalo

Overview

This node integrates with the Zalo Poll service, allowing users to manage polls within the Zalo platform. Specifically, it supports operations such as creating a new poll, retrieving detailed information about an existing poll, and locking a poll to prevent further votes.

A common use case is automating poll management in group chats or communities on Zalo, for example:

  • Creating a poll with specific questions and options.
  • Fetching poll results or details programmatically.
  • Locking a poll after a deadline or when a decision has been made.

The operation "Lấy thông tin bình chọn" (Get poll information) retrieves detailed data about a poll by its ID, which can be useful for reporting or triggering workflows based on poll outcomes.

Properties

Name Meaning
ID bình chọn (poll_id) The unique numeric identifier of the poll whose information you want to retrieve. This property is required for the "getPoll" operation under the "Poll" resource.

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 API call was successful.
  • response: An object containing detailed information about the poll retrieved from Zalo.
  • poll_id: The ID of the poll requested.

Example output JSON snippet:

{
  "success": true,
  "response": {
    /* Detailed poll data returned by Zalo API */
  },
  "poll_id": 123456
}

No binary data output is produced by this node.

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides 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.
    • Missing or incorrect poll ID will result in errors when fetching poll details.
    • Network or API downtime could lead to request failures.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node failed to initialize the Zalo API client due to missing or invalid credentials. Verify your API key and credential setup.
    • Errors related to poll ID or parameters will indicate missing or malformed inputs. Ensure the poll ID is provided and is a valid number.
    • If the node is set to continue on fail, errors will be returned in the output JSON under an error field for each failed item.

Links and References

Discussion