Zalo Poll icon

Zalo Poll

Quản bình chọn Zalo

Poll → Tạo Bình Chọn

AI-generated

Summary

Creates a new poll in a Zalo group chat with configurable options, expiration, and privacy settings.

Inputs

  • groupId (required) — ID of the Zalo group to post the poll in.
  • question (required) — The text of the poll question.
  • optionInputType — Whether to enter options individually (list) or as a comma-separated string (text). Defaults to list.
  • pollOptionsCollection — List of individual poll options. Visible when optionInputType is set to 'list'.
  • optionsString — Comma-separated list of poll options. Visible when optionInputType is set to 'text'.
  • expiredTime — Expiration date and time for the poll. Leave empty for no expiration.
  • pinAct — Whether to pin the poll to the top of the chat.
  • allowMultiChoices — Whether participants can select multiple options.
  • allowAddNewOption — Whether participants can add new options to the poll.
  • hideVotePreview — Whether to hide vote results until the poll is closed.
  • isAnonymous — Whether the poll is anonymous (participants cannot see who voted).

Output shape

A single item containing the Zalo API response object, the group ID, and the raw input parameters.

The returned JSON includes the raw API response which contains the poll ID, allowing subsequent operations (like retrieving details or locking).

Examples

Example 1: Create a simple poll with two options in a group chat.

Question: 'What is your favorite color?', Options: 'Red', 'Blue', Allow multiple choices: true

Example 2: Create an anonymous poll with a deadline and pinned to the top.

Question: 'Best team for next sprint?', Options: 'Team A, Team B', Expiration: 2024-12-31, Pin: true, Anonymous: true

Links

Discussion