Actions3
Overview
This node enables creating and managing polls within Zalo groups. It is particularly useful for group administrators or members who want to gather opinions, votes, or feedback from participants in a structured way. The node supports creating new polls with customizable questions and options, retrieving poll details, and locking polls to prevent further voting.
Practical examples include:
- Creating a poll to decide on a meeting time or event.
- Collecting votes on preferred features or ideas within a team.
- Locking a poll after the voting deadline to finalize results.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm (groupId) | The ID of the Zalo group where the poll will be created (only works with groups). |
| Chủ đề Bình Chọn (question) | The question or topic of the poll to be asked. |
| Kiểu Nhập lựa Chọn (optionInputType) | How poll options are entered: "Danh Sách" (list of separate options) or "Văn Bản" (all options in one text field separated by commas). |
| Các lựa Chọn (pollOptionsCollection) | When using list input type, add multiple individual poll options here. |
| Các lựa Chọn (optionsString) | When using text input type, enter all options as a comma-separated string. |
| Thời Hạn Bình Chọn (expiredTime) | Optional expiration date/time for the poll; leave empty if no expiration. |
| Ghim Lên đầU Trò Chuyện (pinAct) | Whether to pin the poll message at the top of the chat. |
| Chọn Nhiều Phương Án (allowMultiChoices) | Whether participants can select multiple options when voting. |
| Có Thể Thêm Phương Án (allowAddNewOption) | Whether participants can add new options to the poll. |
| ẨN Kết Quả Khi chưa Bình Chọn (hideVotePreview) | Whether to hide poll results until the participant has voted. |
| ẨN Người Bình Chọn (isAnonymous) | Whether to keep voters anonymous so participants cannot see who voted for what. |
Output
The node outputs JSON data containing:
success: Boolean indicating if the operation succeeded.response: The raw response object returned by the Zalo API for the poll operation.- Additional context fields depending on the operation, e.g.,
groupIdandcreatePollDatafor poll creation, orpoll_idfor retrieval and locking operations.
No binary data output is produced by this node.
Dependencies
- Requires an active connection to the Zalo API via an API key credential.
- Needs valid authentication information including cookie, IMEI, and user agent strings.
- The node uses the external
zalo-api-finallibrary to interact with Zalo services. - Proper configuration of credentials in n8n is necessary to authenticate requests.
Troubleshooting
- Common issues:
- Missing or invalid group ID when creating a poll will cause errors.
- Providing no poll options or empty options will trigger validation errors.
- Expired or invalid API credentials will prevent successful API calls.
- Error messages:
"No API instance found. Please make sure to provide valid credentials."indicates missing or invalid authentication."Please enter at least one option for the poll"means no valid poll options were provided.- Errors related to option processing indicate malformed input in the options collection or options string.
- To resolve errors, verify that all required parameters are correctly set, ensure credentials are valid, and check the format of poll options.
Links and References
- Zalo Official API Documentation
- n8n Documentation
- Zalo API Final GitHub Repository (replace with actual link if available)