Actions3
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 poll, retrieving poll details, and locking a poll. This is useful for automating poll management in group chats or communities on Zalo, enabling workflows that gather opinions, conduct surveys, or control poll availability programmatically.
For the "Lấy thông tin bình chọn" (Get Poll Information) operation under the Poll resource, the node fetches detailed information about a specific poll by its ID. This can be used to retrieve current poll status, options, votes, and other metadata, which is helpful for reporting or decision-making processes.
Practical example:
- Automatically fetch poll results after a poll ends to trigger follow-up actions.
- Integrate poll data into dashboards or reports.
- Monitor active polls and their statuses in real-time.
Properties
| Name | Meaning |
|---|---|
| ID bình chọn | The numeric ID of the poll to retrieve information for. This is required to specify which poll's details to fetch. |
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, including questions, options, votes, and other metadata returned by the Zalo API.poll_id: The ID of the poll requested.
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-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured in n8n beforehand.
- Proper network access to Zalo's API endpoints is necessary.
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 credential setup.- Errors related to poll ID or parameters usually indicate missing or malformed input. Ensure the poll ID is provided and is a valid number.
- If the node throws errors during execution but "Continue On Fail" is enabled, it will output error messages per item instead of stopping the workflow.