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 a poll by its ID, 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.
- Managing poll lifecycle programmatically within an automation workflow.
Properties
Name | Meaning |
---|---|
ID bình chọn | The numeric ID of the poll to lock |
Output
The node outputs a JSON object for each input item processed. The structure includes:
success
: A boolean indicating if the lock operation was successful.response
: The raw response from the Zalo API regarding the lock action.poll_id
: The ID of the poll that was locked.
Example output JSON:
{
"success": true,
"response": { /* API response details */ },
"poll_id": 123456
}
No binary data output is produced by this operation.
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-js
library to interact with the Zalo API. - Proper configuration of the Zalo API credential in n8n is necessary for authentication.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause authentication failures.
- Providing a non-existent or incorrect poll ID will result in errors from the API.
- Network connectivity problems can prevent communication with the Zalo API.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not initialize the API client due to missing or invalid credentials. Verify your Zalo API credential setup.- Errors related to poll ID usually indicate the poll does not exist or you lack permission. Double-check the poll ID value.
- If the node throws errors about processing options or parameters, ensure all required fields are correctly set and formatted.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (for the underlying Zalo API client)