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, multiple options, and various settings such as expiration time, anonymity, multi-choice allowance, and whether members can add new options. This is useful for gathering opinions or making decisions in group chats efficiently.

Common scenarios:

  • Organizing quick votes among team members.
  • Collecting preferences or feedback from community groups.
  • Scheduling events by polling availability or choices.

Practical example:
A project manager wants to decide on a meeting date with their team. They create a poll with several date options, allow multiple selections, and set an expiration time of 24 hours. Team members vote, and the manager pins the poll for visibility.

Properties

Name Meaning
Group Id The unique identifier of the Zalo group where the poll will be created.
Poll Question The question or topic of the poll.
Poll Options Comma-separated list of options that participants can choose from.
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 options to the poll.
Hide Vote Preview Boolean flag to hide poll results until the user has voted.
Anonymous Poll Boolean flag to keep voters' identities hidden.
Pin Poll Boolean flag to pin the poll message in the group chat for prominence.

Output

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

  • A success indicator (success boolean).
  • The response data from the Zalo API regarding the created poll.
  • In case of failure, error details including messages and stack traces.

If binary data is involved (not indicated here), it would represent attachments or media related to the poll.

Dependencies

  • Requires an API key credential for authenticating with the Zalo API.
  • Uses external libraries for HTTP requests and file system operations.
  • The node expects proper configuration of credentials and network access to Zalo services.

Troubleshooting

Common issues:

  • Invalid Group Id: If the provided group ID does not exist or the API key lacks permission, the poll creation will fail.
  • Malformed Poll Options: Options must be comma-separated strings; improper formatting may cause errors.
  • Expired or Invalid API Key: Authentication failures will prevent poll creation.
  • Network Issues: Connectivity problems to Zalo API endpoints can cause timeouts or errors.

Error messages and resolutions:

  • "Group not found": Verify the group ID is correct and accessible.
  • "Authentication failed": Check the API key credential validity and permissions.
  • "Invalid poll options": Ensure options are properly formatted and non-empty.
  • "Poll creation failed": Review error details; may require adjusting input parameters or retrying.

Links and References


Note: The above summary is based solely on static analysis of the provided source code and property definitions without runtime execution or internal credential names exposure.

Discussion