Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Poll → Tạo bình chọn

AI-generated

Overview

This node operation creates a poll in a specified Zalo group. It allows users to set a poll question, define options either as a list or a comma-separated string, and configure various poll settings such as expiration time, pinning the poll to the top of the chat, allowing multiple choices, enabling participants to add new options, hiding vote previews until voting, and anonymizing voters. This is useful for group decision-making, gathering opinions, or organizing votes within Zalo groups.

Use Case Examples

  1. Creating a poll in a Zalo group to decide on a meeting time with options entered as a list.
  2. Creating a poll with options entered as a comma-separated string to quickly gather preferences on a topic.

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.
Kiểu nhập lựa chọn The input type for poll options, either as a list of separate options or a single text field with comma-separated options.
Các lựa chọn The poll options entered as individual items when option input type is 'list'.
Các lựa chọn The poll options entered as a comma-separated string when option input type is 'text'.
Thời hạn bình chọn The expiration time of the poll. Leave empty if no expiration is desired.
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 for what.

Output

JSON

  • success - Indicates if the poll creation was successful.
  • response - The response data from the Zalo API containing details of the created poll.
  • groupId - The ID of the group where the poll was created.
  • createPollData - The data used to create the poll including question, options, and settings.

Dependencies

  • Zalo API credentials with cookie, IMEI, and user agent for authentication

Troubleshooting

  • Error processing poll options: Ensure options are provided either as a non-empty list or a valid comma-separated string.
  • Zalo API not initialized: Verify that valid Zalo API credentials are provided and the API instance is properly created.
  • Empty options error: At least one poll option must be provided to create a poll.

Discussion