Zalo Poll icon

Zalo Poll

Quản bình chọn Zalo

Poll → Tạo bình chọn

AI-generated

Overview

This node enables users to create and manage polls within Zalo group chats. It is particularly useful for gathering opinions, making decisions, or conducting surveys among group members in a structured and interactive way. For example, a team leader can quickly create a poll to decide on meeting times or project priorities, allowing participants to vote and optionally add new options.

The "Tạo bình chọn" (Create Poll) operation allows creating a poll with customizable questions, multiple choice options, voting settings, and display preferences.

Properties

Name Meaning
ID Nhóm The ID of the Zalo group where the poll will be created (only works with groups).
Chủ đề bình chọn The question or topic of the poll.
Kiểu nhập lựa chọn How to input poll options: either as a list of separate entries ("Danh sách") or a single text field with comma-separated options ("Văn bản").
Các lựa chọn (list) When using list input type, add multiple individual options for the poll.
Các lựa chọn (text) When using text input type, enter all options separated by commas in one field.
Thời hạn bình chọn Optional expiration date/time for the poll; leave empty if no expiration is desired.
Ghim lên đầu trò chuyện Whether to pin the poll message at the top of the chat.
Chọn nhiều phương án Allow participants to select multiple choices when voting.
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 votes anonymous so participants cannot see who voted for which option.

Output

The node outputs JSON data containing:

  • success: Boolean indicating if the poll creation was successful.
  • response: The raw response object returned from the Zalo API after creating the poll, including poll details.
  • groupId: The ID of the group where the poll was created.
  • createPollData: An object summarizing the parameters used to create the poll (question, options, settings).

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential to authenticate with the Zalo platform.
  • Uses the Zalo API client library internally to perform actions such as creating polls.
  • The node expects valid credentials including cookie, device IMEI, and user agent information for authentication.
  • No additional environment variables are explicitly required beyond the API credential.

Troubleshooting

  • Missing or invalid credentials: The node throws an error if the Zalo API instance cannot be initialized due to missing or incorrect authentication data. Ensure that the API key credential is correctly configured.
  • Empty poll options: If no poll options are provided, the node will throw an error asking to input at least one option. Verify that options are entered correctly according to the selected input type.
  • Invalid group ID: Providing an incorrect or non-existent group ID may cause the poll creation to fail. Confirm the group ID is valid and accessible.
  • Date format issues: The expiration time must be a valid date/time string or left empty. Invalid formats may cause errors.
  • API errors: Any errors returned by the Zalo API during poll creation will be surfaced. Check the error message for details and verify network connectivity and API limits.

If the node is set to continue on failure, errors will be included in the output JSON under an error field instead of stopping execution.

Links and References

Discussion