Actions85
- Instances Actions
- Client Actions
- Message Actions
- Chat Actions
- Contact Actions
- Number Actions
- Group Actions
- Channel Actions
- Label Actions
- Story Actions
Overview
This node operation allows you to create a poll message in a chat using the WaAPI service. It is useful for gathering opinions, votes, or feedback from participants within a chat group or individual conversation. For example, you can ask "What's your favorite color?" and provide multiple options for users to select from.
Common scenarios include:
- Conducting quick surveys in group chats.
- Collecting preferences or decisions from team members.
- Engaging community members with interactive polls.
Properties
| Name | Meaning |
|---|---|
| Id | Instance ID of the poll message (number). |
| Chat Id | Identifier of the chat where the poll will be sent. Format: <countrycode><number>@c.us for individuals or @g.us for groups. |
| Caption | The question or caption text displayed above the poll options. |
| Options | JSON array of poll options. Must contain between 2 and 12 string values representing choices. Example: ["Red", "Blue", "Green"]. |
| Multiple Answers | Boolean flag indicating if participants can select multiple options (true) or only one (false). |
Output
The node outputs JSON data representing the response from the WaAPI service after creating the poll. This typically includes details about the created poll message such as its ID, status, and metadata confirming successful creation.
No binary data output is involved in this operation.
Dependencies
- Requires an active API key credential for the WaAPI service.
- The node communicates with the WaAPI endpoint at
https://waapi.app/api/v1. - Proper configuration of the API authentication in n8n credentials is necessary.
Troubleshooting
- Invalid Chat Id: Ensure the chat ID follows the correct format (
<countrycode><number>@c.usfor individuals or@g.usfor groups). Incorrect formats will cause errors. - Options Array Issues: The poll options must be a valid JSON array containing between 2 and 12 items. Providing fewer or more options, or invalid JSON, will result in request failure.
- API Authentication Errors: Missing or incorrect API key credentials will prevent the poll from being created. Verify that the API key is correctly set up in n8n.
- Network or Service Unavailability: If the WaAPI service is down or unreachable, the node will fail to send the poll. Check network connectivity and service status.
Links and References
- WaAPI Official Documentation (for detailed API usage and capabilities)
- n8n Documentation on Creating Custom Nodes