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 interacts with the SparkBot WhatsApp API to manage and send various types of messages, including text, media, polls, events, locations, contacts, reactions, products, and more. Specifically, for the "Send messages" resource and the "Delete votes in a poll" operation, it allows users to remove votes from an existing poll message on WhatsApp.
Common scenarios where this node is beneficial include managing interactive WhatsApp polls within customer engagement workflows, such as removing invalid or unwanted votes from a poll, moderating poll responses, or resetting poll results programmatically.
Practical example: A business running a WhatsApp poll to gather customer feedback can use this node to delete specific votes if they detect spam or incorrect responses, ensuring the poll results remain accurate.
Properties
| Name | Meaning |
|---|---|
| WhatsApp number | The target SparkBot Number ID used for sending the message. This identifies which WhatsApp number/account will be used. |
| Target | Type of target chat to send the message to. Options: Phone, Group, 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 ID of the poll message from which votes should be removed. Must be a valid hexadecimal string of length 18, 20, 24, or 32 characters. |
| Options | Collection of optional settings for message delivery, including: - Priority (Normal, High, Low) - Label (custom categorization label) - Reference ID (custom reference) - Team Agent (send on behalf of an agent) - Live mode (real-time delivery without queue) - Delivery Queue Mode (Default, Always Queue, Never Queue, Opportunistic) - Maximum Retries (number of retries for delivery) - Chat Actions (post-delivery actions like assign chat, resolve chat, add/remove labels, set metadata, etc.) |
| Message Expiration | Defines time-to-live (TTL) for the message with options: - Expire after seconds - Expire after duration (e.g., 1h, 30m) - Expire at a specific date/time |
| Mark Chat as Read | Boolean flag to notify WhatsApp that previous unread messages will be marked as read after delivery (blue double-check). |
| Typing simulation | Number of seconds (0-30) to simulate typing or recording status before sending the message. 0 disables simulation. |
| Quote Message | Message ID to quote when sending the message (must be in the same conversation). |
| Strict Message Order | Boolean to ensure messages are sent in strict order. Useful for chatbots and sequences. Not compatible with live mode or never queue delivery. |
Output
The node outputs JSON data representing the result of the executed operation. For the "Delete votes in a poll" operation, the output JSON typically contains confirmation details about the deletion of votes from the specified poll message, such as success status or any relevant metadata returned by the SparkBot API.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for authenticating with the SparkBot WhatsApp API.
- The node depends on the SparkBot service being accessible and properly configured.
- Some properties load dynamic options via methods (e.g., getDevices, getGroups, getChannels, getLabels, getTeamAgents), which require proper API access and permissions.
- No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
- Invalid Poll Message ID: If the pollMessageId does not match the expected hexadecimal format or length, the node will throw a validation error. Ensure the ID is correct and matches the poll message you intend to modify.
- Target Selection Errors: Selecting a target type (phone, group, channel) without providing the corresponding required ID or number will cause errors. Make sure to provide the correct target identifier.
- API Authentication Failures: Missing or invalid API key credentials will prevent the node from executing operations. Verify that the API key is correctly configured.
- Rate Limits and Delivery Modes: Using real-time delivery modes ("live" or "never queue") while sending many messages per minute may increase the risk of WhatsApp bans. Use queue modes appropriately.
- Chat Action Misconfiguration: When specifying chat actions post-message delivery, ensure required fields like Agent ID or Department ID are provided when necessary.
- Typing Simulation Limits: Typing simulation must be between 0 and 30 seconds; values outside this range will cause errors.
Links and References
- WhatsApp Business API Documentation
- SparkBot Official API Documentation (hypothetical link based on context)
- E.164 Phone Number Format
- n8n Documentation - Creating Custom Nodes