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 integrates with the SparkBot WhatsApp API to manage queued WhatsApp messages. Specifically, the Route Queue operation under the Queue resource allows users to reroute queued messages from one WhatsApp number (device) to another target WhatsApp number (device). This is useful in scenarios where message handling needs to be dynamically redirected, such as transferring message queues between different agents or devices for load balancing, failover, or operational reasons.
Practical examples:
- Automatically rerouting all pending messages from a device that is going offline to another active device.
- Redirecting message queues during shift changes among customer support agents.
- Managing message flow by routing queues to specialized devices based on message content or priority.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the source WhatsApp number/device whose queued messages are to be routed. |
| Target WhatsApp Number ID | The ID of the target WhatsApp number/device to which the queued messages will be rerouted. |
Both properties require selecting from available WhatsApp devices loaded dynamically via the getDevices method.
Output
The node outputs JSON data representing the result of the queue routing operation. This typically includes confirmation details about the rerouting action, such as success status and 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.
- Dynamic loading of WhatsApp devices requires the API to provide device information.
Troubleshooting
Common issues:
- Invalid or missing WhatsApp device IDs can cause failures in rerouting.
- Network or authentication errors with the SparkBot API may prevent successful execution.
- Attempting to route queues when no messages are queued might return empty or error responses.
Error messages:
- Errors related to invalid device IDs usually indicate incorrect selection or expired device references.
- Authentication errors suggest problems with the provided API key credential.
- Timeout or connectivity errors imply network issues or API unavailability.
Resolution tips:
- Verify that both source and target WhatsApp numbers are valid and currently registered devices.
- Ensure the API key credential is correctly set up and has necessary permissions.
- Check network connectivity and SparkBot API status.
Links and References
- SparkBot WhatsApp API Documentation (example placeholder link)
- n8n documentation on Creating Custom Nodes
- General WhatsApp Business API concepts for queue management and message routing.