Actions3
Overview
This node enables users to create and manage polls within Zalo group chats. It is particularly useful for gathering opinions, making decisions, or conducting quick surveys among group members on the Zalo platform.
The "Tạo bình chọn" (Create Poll) operation allows you to define a poll question, specify multiple answer options, set voting rules such as allowing multiple choices or anonymous voting, and optionally pin the poll to the top of the chat. This facilitates interactive engagement in group conversations.
Practical examples:
- A team lead creates a poll to decide the date for a meeting.
- A community manager gathers feedback on event preferences.
- A group admin runs a quick vote on selecting a group activity.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm | The ID of the Zalo group where the poll will be created (only works with groups). |
| Chủ đề bình chọn | The poll question/topic that participants will vote on. |
| Kiểu nhập lựa chọn | Method to input poll options: either as a list of separate entries ("Danh sách") or a single text field with comma-separated options ("Văn bản"). |
| Các lựa chọn | When using "Danh sách" input type: a collection of individual poll options entered separately. |
| Các lựa chọn | When using "Văn bản" input type: a single string containing all options separated by commas. |
| Thời hạn bình chọn | Optional expiration date/time for the poll; leave empty if no expiration is desired. |
| Ghim lên đầu trò chuyện | Whether to pin the poll message at the top of the chat for visibility. |
| Chọn nhiều phương án | Allow participants to select multiple options when voting. |
| Có thể thêm phương án | Allow participants to add new options to the poll during voting. |
| Ẩn kết quả khi chưa bình chọn | Hide poll results from participants until they have voted. |
| Ẩn người bình chọn | Make votes anonymous so participants cannot see who voted for which option. |
Output
The node outputs JSON data containing:
success: Boolean indicating if the poll creation was successful.response: The raw response object returned from the Zalo API after creating the poll.groupId: The ID of the group where the poll was created.createPollData: An object summarizing the parameters used to create the poll (question, options, settings).
This output can be used downstream in workflows to confirm poll creation, log details, or trigger further actions based on the poll.
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- Uses the Zalo API client library internally to perform poll operations.
- The node expects valid credentials including cookie, device IMEI, and user agent information for authentication.
- No additional external dependencies beyond the Zalo API and its SDK are required.
Troubleshooting
- Missing or invalid credentials: The node throws an error if the Zalo API instance cannot be initialized due to missing or incorrect authentication data. Ensure the API key credential is properly configured.
- No poll options provided: If no poll options are entered, the node will raise an error prompting to input at least one option.
- Invalid option input format: Errors may occur if the options collection or comma-separated string is malformed. Double-check the input format matches the selected "Kiểu nhập lựa chọn".
- API errors: Any errors returned from the Zalo API during poll creation will be surfaced. Review the error message for details and verify the group ID and other parameters are correct.
- Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output.