Actions148
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
Overview
This node allows sending votes in a poll message via the SparkBot WhatsApp API. It is designed to interact with existing poll messages by submitting one or more votes for specified options. This functionality is useful in scenarios where automated workflows need to participate in polls, such as gathering user feedback, conducting surveys, or automating decision-making processes within WhatsApp chats.
For example, a chatbot could automatically vote on behalf of a user in a poll about preferred meeting times, or a marketing automation workflow could register votes collected from external sources into a WhatsApp poll.
Properties
| Name | Meaning |
|---|---|
| WhatsApp number | The target SparkBot Number ID used to send the vote message. This identifies which WhatsApp number/account will deliver the vote. |
| Target | Type of chat where the poll is located: Phone (individual), Group, or Channel. |
| Phone Number | The recipient's phone number in international E.164 format (e.g., +1234567890). Required if Target is "Phone". |
| Group ID | The ID of the target group chat (e.g., 12345678902401234@g.us). Required if Target is "Group". |
| Channel ID | The ID of the target channel (e.g., 12345678902402200@newsletter). Required if Target is "Channel". |
| Poll Message ID | The unique identifier of the poll message to vote on. Must be a hexadecimal string between 18 and 32 characters. |
| Vote Options | One or more options to vote for. Each option can be identified either by its numeric option ID (0-11) or by the exact text of the poll option. Leaving this empty removes all votes. |
| Options | Additional message delivery options including: - Priority (Normal, High, Low) - Custom label for categorization - Reference ID - Agent to send on behalf of - Real-time sending mode toggle - Delivery queue mode - Maximum retries - Post-delivery chat actions (assign, resolve, label, metadata, etc.) - Message expiration settings - Read receipt toggle - Typing simulation duration - Quote message ID - Strict message order enforcement |
Output
The node outputs JSON data representing the result of the vote submission operation. This typically includes confirmation details such as success status, any returned message IDs, or error information if the vote failed.
No binary data output is involved in this operation.
Dependencies
- Requires an active SparkBot WhatsApp API account with a valid API key credential configured in n8n.
- The node depends on the SparkBot API endpoints for sending messages and managing polls.
- Proper configuration of the SparkBot Number ID and access permissions to the target chat (phone, group, or channel) are necessary.
- Some properties load dynamic options (e.g., devices, groups, channels, agents, labels) via API calls, so network connectivity and correct API credentials are essential.
Troubleshooting
- Invalid Poll Message ID: If the poll message ID does not match the required hexadecimal format or length, the node will throw a validation error. Ensure the ID is correct and corresponds to an existing poll message.
- Target Chat Not Found: Errors may occur if the specified phone number, group ID, or channel ID is invalid or inaccessible. Verify that the target exists and the bot has permission to send messages there.
- Vote Option Mismatch: Voting by option text requires exact matching of the poll option text. Mismatches will cause the vote to fail. Use option IDs when possible for reliability.
- Rate Limits and Delivery Modes: Using real-time delivery modes ("live" or "never queue") at high volumes may increase the risk of being banned by WhatsApp. Use queuing options appropriately based on your message volume.
- Agent and Department IDs: When assigning chat actions post-vote, ensure agent and department IDs are valid 24-character hexadecimal strings.
- Typing Simulation: Setting typing simulation too long may delay message delivery unnecessarily; keep it within recommended limits (2-30 seconds).
- Strict Message Order: Enabling strict order is incompatible with live mode or never queue delivery; using these together may cause errors.
Links and References
- WhatsApp Polls Documentation (general reference for poll message structure)
- SparkBot API official documentation (access provided by your SparkBot service provider)
- n8n documentation on creating custom nodes and handling message operations
This summary focuses specifically on the "Send votes in a poll" operation under the "Send messages" resource, describing its inputs, outputs, dependencies, and common troubleshooting points based on static analysis of the provided code and property definitions.