Actions3
Overview
This node integrates with the Zalo Poll API to manage polls within the Zalo platform. Specifically, the "Khóa bình chọn" (Lock Poll) operation allows users to lock an existing poll, preventing further votes or changes. This is useful in scenarios where a poll has reached its deadline or when the poll creator wants to finalize results.
Practical examples:
- Automatically locking a poll after a certain time period.
- Locking a poll once a target number of votes is reached.
- Integrating poll locking into a workflow that processes poll results after closure.
Properties
| Name | Meaning |
|---|---|
| ID bình chọn | The numeric ID of the poll to be locked. This identifies which poll will be locked by the operation. |
Output
The node outputs JSON data with the following structure:
success: A boolean indicating if the lock operation was successful.response: The raw response from the Zalo API regarding the lock action. This typically contains confirmation details or status information.poll_id: The ID of the poll that was locked.
No binary data output is produced by this operation.
Example output JSON:
{
"success": true,
"response": { /* API response object */ },
"poll_id": 123456
}
Dependencies
- Requires valid Zalo API credentials including an API key credential with cookie, IMEI, and user agent information.
- The node depends on the external
zca-jslibrary for interacting with the Zalo API. - Proper configuration of the Zalo API credential in n8n is necessary to authenticate requests.
Troubleshooting
Common issues:
- Invalid or expired credentials causing authentication failures.
- Providing a non-existent or incorrect poll ID.
- Network connectivity problems affecting API calls.
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. Solution: Verify and reconfigure the Zalo API credential.- Errors related to poll ID usually indicate the poll does not exist or the user lacks permission. Double-check the poll ID value.
- If the node throws errors about processing input properties, ensure the poll ID is provided as a number and is required.
Enabling "Continue On Fail" can help process multiple items even if some fail.
Links and References
- Zalo Official Developer Documentation (for detailed API reference)
- n8n Documentation (for general node usage and credential setup)