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, specifically allowing management of WhatsApp sessions. The "Reboot session" operation under the "WhatsApp session" resource enables users to reboot a WhatsApp device session remotely. This can be useful in scenarios where a WhatsApp session becomes unresponsive or needs to be refreshed without manual intervention on the device.
Practical examples include:
- Automatically rebooting a WhatsApp session if message sending fails due to session issues.
- Forcing a session reboot during maintenance windows.
- Synchronizing session data after reboot to ensure up-to-date status.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) whose session you want to reboot. Loaded dynamically from available devices. |
| Options | Collection of optional flags to customize the reboot behavior: |
| - Force Reboot | Whether to force the device reboot even if it is already stopped (boolean). |
| - Wait For Session | Whether to wait for the device session to become available after reboot, which may delay response up to 90 seconds (boolean). |
| - Force Sync | Whether to force synchronization of the device session after reboot (boolean). |
Output
The node outputs JSON data representing the result of the reboot operation. This typically includes status information about the reboot request and possibly updated session details. The exact structure depends on the API response but generally confirms whether the reboot was successful.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the SparkBot WhatsApp API.
- The node relies on dynamic loading of WhatsApp device IDs via a method named
getDevices. - Network connectivity to the SparkBot API endpoint is necessary.
- No additional environment variables are explicitly required beyond the API key.
Troubleshooting
Common Issues:
- Invalid or missing WhatsApp Number (device ID): Ensure the device ID is selected from the dynamically loaded options.
- API authentication failures: Verify that the API key credential is correctly configured and has sufficient permissions.
- Timeout when waiting for session availability: If "Wait For Session" is enabled, the node may take up to 90 seconds; network delays or device issues could cause longer waits or failures.
Error Messages:
- Errors returned by the API will be surfaced as error messages in the node output.
- If the node is set to continue on failure, errors will appear in the JSON output under an
errorfield.
Resolutions:
- Double-check device IDs and API credentials.
- Retry with "Force Reboot" enabled if the session does not reboot normally.
- Disable "Wait For Session" if immediate response is preferred and handle session availability separately.
Links and References
- SparkBot WhatsApp API Documentation (example placeholder, replace with actual URL if known)
- n8n Documentation on Creating Custom Nodes
- General WhatsApp Business API concepts for session management.