Actions3
Poll → Tạo Bình Chọn
AI-generatedOverview
This node creates a poll in a Zalo group chat. It allows users to specify the group ID, the poll question, and the options for voting. Users can input options either as a list of individual choices or as a comma-separated text string. Additional settings include poll expiration time, pinning the poll to the top of the chat, allowing multiple choices, permitting participants to add new options, hiding results until voting, and anonymizing voters. This node is useful for gathering opinions or making decisions within Zalo group chats.
Use Case Examples
- Creating a poll in a Zalo group to decide on a meeting time with multiple options.
- Setting up a poll with an expiration date to collect votes on a preferred event location.
- Creating an anonymous poll where participants cannot see who voted for which option.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm | The ID of the Zalo group where the poll will be created. This is required and only works with groups. |
| Chủ đề Bình Chọn | The question or topic of the poll to be created. This is a required field. |
| Kiểu Nhập lựa Chọn | The input method for poll options. Users can either enter each option separately (Danh Sách) or input all options as a comma-separated text string (Văn Bản). |
| Các lựa Chọn | The poll options to be added. This can be a collection of individual options if 'Danh Sách' input type is selected. |
| Các lựa Chọn (Text) | A comma-separated string of poll options if 'Văn Bản' input type is selected. |
| Thời Hạn Bình Chọn | The expiration time of the poll. Leave empty if there is no expiration. |
| Ghim Lên đầU Trò Chuyện | Whether to pin the poll to the top of the chat. |
| Chọn Nhiều Phương Án | Allow participants to select multiple options in the poll. |
| 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 the poll anonymous so participants cannot see who voted. |
Output
JSON
success- Indicates if the poll creation was successful.response- The response data from the Zalo API after creating the poll.groupId- The ID of the group where the poll was created.createPollDataquestion- The poll question that was set.options- The list of options included in the poll.expiredTime- The expiration time of the poll, if set.pinAct- Whether the poll was pinned to the top of the chat.allowMultiChoices- Whether multiple choices are allowed.allowAddNewOption- Whether participants can add new options.hideVotePreview- Whether the poll results are hidden until voting.isAnonymous- Whether the poll is anonymous.
Dependencies
- Requires Zalo API credentials (cookie, imei, userAgent) to authenticate and create polls via the Zalo API.
Troubleshooting
- Ensure valid Zalo API credentials are provided; otherwise, the node will throw an error indicating no API instance found.
- If no poll options are provided, the node will throw an error asking to input at least one option.
- Errors during poll creation will be logged and can be handled by enabling 'Continue On Fail' to allow the workflow to proceed despite errors.
Links
- Zalo Node Documentation by diginno.net - Official documentation and guide for using the Zalo node in n8n.