Zalo User Interact icon

Zalo User Interact

Gửi tin nhắn và tương tác với Zalo User

Overview

This node operation creates a poll within a specified group on the Zalo platform. It allows users to define a question, provide multiple options for voting, and configure various settings such as expiration time, anonymity, multi-choice allowance, and whether members can add new options. This node is useful for gathering opinions or making decisions in group chats, such as team polls, event planning, or quick surveys.

Practical examples:

  • Creating a poll to decide on a meeting time among team members.
  • Conducting a survey to choose a preferred lunch spot in a group chat.
  • Running anonymous votes on sensitive topics where voter privacy is important.

Properties

Name Meaning
Group Id The unique identifier of the Zalo group where the poll will be created.
Poll Question The question text that will be presented to group members for voting.
Poll Options Comma-separated list of choices available for voting in the poll.
Poll Expired Time (ms) Duration in milliseconds after which the poll expires; 0 means no expiration.
Allow Multiple Choices Boolean flag to allow voters to select more than one option.
Allow Add New Option Boolean flag to permit group members to add new voting options beyond the initial list.
Hide Vote Preview Boolean flag to hide poll results until the user has voted.
Anonymous Poll Boolean flag to keep voters' identities hidden from other group members.
Pin Poll Boolean flag to pin the poll message within the group for prominence.

Output

The node outputs an array of JSON objects representing the result of the poll creation request. Each object contains at least:

  • success: A boolean indicating if the poll was successfully created.
  • data: An object with details about the created poll, such as poll ID, question, options, and configuration.
  • error (optional): If the poll creation failed, this field contains error information including message and stack trace.

If the node supports binary data output (not evident here), it would typically represent attachments or media related to the poll.

Dependencies

  • Requires access to the Zalo API with appropriate permissions to manage groups and create polls.
  • Needs an API key or authentication token configured in n8n credentials to authorize requests.
  • Uses internal helper libraries for HTTP requests and response handling (bundled in the source).
  • No external file system or database dependencies are indicated.

Troubleshooting

Common Issues

  • Invalid Group Id: If the provided group ID does not exist or the authenticated user lacks permission, the poll creation will fail.
  • Malformed Poll Options: The poll options must be a comma-separated string; improper formatting may cause errors.
  • Expired or Missing Credentials: Authentication failures due to invalid or expired API keys will prevent poll creation.
  • API Rate Limits: Excessive requests might trigger rate limiting by the Zalo API.

Error Messages and Resolutions

  • "Group not found" or "Permission denied": Verify the group ID and ensure the API key has sufficient rights.
  • "Invalid poll options": Check that the poll options string is correctly formatted with commas separating each choice.
  • "Authentication failed": Reconfigure the API credentials in n8n and test connectivity.
  • Unhandled exceptions: Review the error stack trace in the node's execution logs for debugging; ensure all required properties are set.

Links and References


Note: The analysis is based solely on static code inspection and provided property definitions without runtime execution or dynamic import resolution. Internal credential names and implementation details have been generalized for clarity and security.

Discussion