Actions25
- Message Actions
- Friend Actions
- Get Actions
- Group Actions
- Tool Actions
Overview
This node operation allows users to create a poll within a specified group on the Zalo platform. It is useful for gathering opinions, making decisions, or conducting surveys among group members. Typical scenarios include team decision-making, event planning, or collecting feedback in community groups.
For example, a project manager can create a poll asking team members to vote on preferred meeting times, or a community admin can survey members about upcoming activities.
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 to be presented to group members. |
| 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 indicating if voters can select more than one option. |
| Allow Add New Option | Boolean flag allowing 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 anonymous. |
| Pin Poll | Boolean flag to pin the poll message within the group chat for visibility. |
Output
The node outputs an array of JSON objects representing the result of the poll creation request. Each object contains at least:
- A success indicator (
successor similar). - Details of the created poll such as poll ID, question, options, and settings.
- Error information if the poll creation failed.
If binary data is output (not evident from the code), it would typically represent media attachments related to the poll, but this node primarily deals with JSON responses.
Dependencies
- Requires an API key credential for authenticating with the Zalo API.
- Depends on the Zalo group messaging API to create polls.
- Uses internal helper libraries for HTTP requests and response handling.
- No explicit environment variables are mentioned beyond standard API authentication.
Troubleshooting
- Invalid Group Id: If the provided group ID does not exist or the authenticated user lacks permission, the node will fail. Verify the group ID and credentials.
- Malformed Poll Options: Poll options must be comma-separated strings. Improper formatting may cause errors.
- Expired Time Format: Ensure the expiration time is a non-negative number representing milliseconds.
- API Authentication Errors: Missing or invalid API keys will prevent poll creation.
- Network Issues: Connectivity problems with the Zalo API endpoint can cause timeouts or failures.
Common error messages include:
- "Group not found" or "Access denied": Check group ID and permissions.
- "Invalid poll options": Correct the format of options.
- "Authentication failed": Reconfigure API credentials.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- Poll Creation API Reference (Zalo)
Note: This summary is based solely on static analysis of the provided source code and property definitions without runtime execution.