Actions3
Poll → Tạo bình chọn
AI-generatedSummary
Create a new poll within a specified Zalo group chat with customizable question, options, and voting settings.
Inputs
- ID Nhóm (required) — ID of the group where the poll will be created (works only with groups).
- Chủ đề bình chọn (required) — The poll question to be asked.
- Kiểu nhập lựa chọn — Method to input poll options, either as a list of separate entries or as a comma-separated text.
- Các lựa chọn (required) — Poll options entered either as multiple separate entries or a single comma-separated string, depending on 'Kiểu nhập lựa chọn'.
- Thời hạn bình chọn — Expiration date and time of the poll; leave empty for no expiration.
- Ghim lên đầu trò chuyện — Whether to pin the poll message at the top of the conversation.
- Chọn nhiều phương án (required) — Allow participants to select multiple options.
- Có thể thêm phương án (required) — Allow participants to add new options to the poll.
- Ẩn kết quả khi chưa bình chọn (required) — Hide poll results from participants until they cast their vote.
- Ẩn người bình chọn (required) — Keep voter identities anonymous from other participants.
Output shape
a list of items, each containing JSON with the creation success status, the API response from Zalo, the target group ID, and the poll creation parameters used.
The operation expects valid Zalo API credentials with cookie, imei, and userAgent. If the creation fails for an item, the error is returned either by failing the node or, if continueOnFail is enabled, as JSON error details paired to the input item.
Examples
Example 1: Creating a poll with separate options
Provide the group ID, question, optionInputType as 'list', and specify at least one non-empty option in the pollOptionsCollection. Optional parameters like expiration time or pinning can be set.
Example 2: Creating a poll with comma-separated text options
Set optionInputType to 'text' and input all options in a single string separated by commas in optionsString. Other parameters remain as described above.