Actions3
Overview
This node enables users to create and manage polls within Zalo groups. It is particularly useful for gathering opinions, making group decisions, or conducting surveys in Zalo chat groups. For example, a community manager can quickly create a poll asking members to vote on the next event date, or a team lead can gather feedback on project priorities.
The "Tạo bình chọn" (Create Poll) operation allows creating a new poll with customizable questions, options, and settings such as allowing multiple choices or anonymous voting.
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 question or topic of the poll. |
| Kiểu nhập lựa chọn | How to input poll options: "Danh sách" (list) to enter each option separately, or "Văn bản" (text) to enter all options in one text field separated by commas. |
| Các lựa chọn (list) | When using list input type, add multiple individual options for the poll. |
| Các lựa chọn (text) | When using text input type, enter all options separated by commas in a single text field. |
| Thời hạn bình chọn | Optional expiration time for the poll; leave empty if no expiration is needed. |
| Ghim lên đầu trò chuyện | Whether to pin the poll message at the top of the chat. |
| 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. |
| Ẩ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 poll parameters used for creation (question, options, expiration, and other settings).
No binary data output is produced by this node.
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- Uses the Zalo API client library (
zca-js) internally to perform operations. - The node expects valid credentials including cookie, IMEI, and user agent information for authentication.
- Proper configuration of these credentials in n8n is necessary for the node to function.
Troubleshooting
- Missing or invalid credentials: The node throws an error if the Zalo API instance cannot be initialized due to missing or invalid authentication details. Ensure that the API key credential is correctly set up with valid cookie, IMEI, and user agent values.
- Empty poll options: If no poll options are provided, the node will throw an error requesting at least one option. Verify that options are entered either as a list or comma-separated text.
- API errors: Any errors returned from the Zalo API during poll creation will be surfaced. Check the error message for details and verify that 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 messages in the output JSON.
Links and References
- Zalo Official API Documentation (for general API reference)
- Zalo Poll Feature Overview (general info about polls in Zalo)
(Note: These links are generic references as the node uses Zalo's API.)