Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node enables creating and managing polls within Zalo groups. It is particularly useful for group administrators or members who want to gather opinions, make decisions, or conduct surveys inside a Zalo chat group. For example, you can create a poll asking group members to vote on the best date for an event or choose a preferred option among several choices.

The "Tạo bình chọn" (Create Poll) operation allows you to specify the poll question, options, voting rules, and additional settings such as anonymity and result visibility.

Properties

Name Meaning
ID Nhóm The ID of the Zalo group where the poll will be created. This only works with groups.
Chủ đề bình chọn The question or topic of the poll that participants will vote on.
Kiểu nhập lựa chọn How to input poll options: either as a list of separate entries ("Danh sách") or as a single text string with options separated by commas ("Văn bản").
Các lựa chọn When using "Danh sách" input type, add multiple individual options here. Each option is a separate choice participants can select.
Các lựa chọn When using "Văn bản" input type, enter all options in one text field separated by commas.
Thời hạn bình chọn Optional expiration date/time for the poll. Leave empty if there is no time limit.
Ghim lên đầu trò chuyện Whether to pin the poll message at the top of the chat for easy visibility.
Chọn nhiều phương án Allow participants to select multiple options when voting.
Có thể thêm phương án Allow participants to add new options to the poll beyond those initially provided.
Ẩ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 whether the poll creation was successful.
  • response: The raw response object returned by the Zalo API after creating the poll, including poll details and metadata.
  • groupId: The ID of the group where the poll was created.
  • createPollData: An object summarizing the parameters used to create the poll, including question, options, expiration time, and voting rules.

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Zalo API credential with appropriate permissions to manage groups and create polls.
  • The node uses an external Zalo API client library to interact with Zalo services.
  • Proper configuration of the API key/credential in n8n is necessary for authentication.
  • The node expects the Zalo API cookie, IMEI, and user agent information either from credentials or input data.

Troubleshooting

  • Error: "Zalo API not initialized"
    This indicates missing or invalid credentials. Ensure that the API key or authentication token is correctly configured in n8n.

  • Error: "Please enter at least one option for the poll"
    Occurs if no poll options are provided. Verify that options are entered either as a list or comma-separated text depending on the selected input type.

  • Error processing poll options
    If the node fails to parse the options collection, check that each option is properly filled and not left empty.

  • General API errors
    Network issues, permission problems, or invalid group IDs may cause failures. Confirm that the group ID exists and the authenticated user has rights to create polls in that group.

Links and References

Discussion