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 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 once voting is closed.
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 decision-making workflows.
Properties
| Name | Meaning |
|---|---|
| ID bình chọn (poll_id) | The numeric ID of the poll to retrieve information for. This is required to identify which poll's details to fetch. |
Output
The node outputs an array of items, each containing a json object with the following structure when performing the "getPoll" operation:
success: A boolean indicating if the API call 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 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-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.
Links and References
- Zalo Official Developer Documentation (for API details)
- n8n Documentation (for general node usage and credential setup)