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, enabling various operations related to WhatsApp messaging and management. Specifically, for the WhatsApp session resource and the Get session health operation, it retrieves the current health status of a specified WhatsApp session (i.e., a WhatsApp number/device). This is useful for monitoring whether a WhatsApp session is active, connected, or experiencing issues.
Practical scenarios include:
- Automatically checking if a WhatsApp number is ready to send/receive messages before attempting communication.
- Monitoring multiple WhatsApp sessions in an automated workflow to detect and handle connection problems.
- Integrating session health checks into alerting systems to notify administrators of session downtime.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number/device whose session health you want to check. This is selected from available devices loaded dynamically by the node. |
Output
The node outputs a JSON object containing the session health information for the specified WhatsApp number. The exact structure depends on the API response but typically includes fields indicating connection status, uptime, last activity, or error states.
If the node supports binary data output (not indicated here), it would represent any associated files or media related to the session health, but this is not applicable for this operation.
Dependencies
- Requires an API key credential for authenticating with the SparkBot WhatsApp API.
- The node dynamically loads available WhatsApp numbers/devices via a method named
getDevices. - No additional external dependencies are indicated beyond the SparkBot API access.
Troubleshooting
Common Issues:
- Invalid or missing WhatsApp number/device ID: Ensure the device is correctly selected from the dropdown.
- Authentication errors: Verify that the API key credential is valid and has necessary permissions.
- Network or API connectivity problems: Check network access and SparkBot service status.
Error Messages:
- Errors returned from the API will be caught and can be output as JSON with an
errorfield if "Continue On Fail" is enabled. - Typical errors might include "Device not found," "Unauthorized," or "Session not active."
- Errors returned from the API will be caught and can be output as JSON with an
Resolutions:
- Re-authenticate or update API credentials.
- Confirm the WhatsApp number/device is registered and active in SparkBot.
- Retry after resolving network issues.
Links and References
- SparkBot WhatsApp API Documentation (hypothetical link as no direct URL provided)
- n8n Documentation on Creating Custom Nodes
- General WhatsApp Business API concepts for session management.