SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

The node integrates with the SparkBot WhatsApp API, enabling various operations related to WhatsApp management. Specifically, for the WhatsApp session resource and the Sync session operation, it synchronizes the session state of a specified WhatsApp number (device). This is useful for ensuring that the session data between the SparkBot service and your workflow remains consistent and up-to-date.

Practical scenarios include:

  • Automatically syncing session status after changes in WhatsApp connectivity.
  • Maintaining session integrity before sending or receiving messages.
  • Troubleshooting session-related issues by refreshing session data programmatically.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) whose session you want to synchronize. This is selected from available devices linked to your account.

Output

The node outputs JSON data representing the result of the session synchronization operation. This typically includes updated session details such as connection status, session tokens, or metadata reflecting the current state of the WhatsApp session.

No binary data output is indicated for this operation.

Example output structure (conceptual):

{
  "sessionId": "string",
  "status": "connected" | "disconnected" | "syncing",
  "lastSync": "ISO8601 timestamp",
  "deviceId": "string",
  "additionalInfo": { /* any other session metadata */ }
}

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.
  • The "WhatsApp Number" property dynamically loads available devices via a method named getDevices, which implies the need for prior device registration or setup within the SparkBot environment.

Troubleshooting

  • Common Issues:

    • Invalid or expired API key leading to authentication failures.
    • Specifying a WhatsApp number (device) that does not exist or is not registered.
    • Network connectivity problems preventing communication with the SparkBot API.
    • Session sync failures due to the WhatsApp client being offline or disconnected.
  • Error Messages:

    • Errors returned from the API will be captured and can appear in the output JSON under an error field if "Continue On Fail" is enabled.
    • Typical error messages might include "Device not found", "Unauthorized", or "Session sync failed".
  • Resolutions:

    • Verify API credentials and renew if necessary.
    • Confirm the WhatsApp number/device ID is correct and active.
    • Ensure network access to the SparkBot API endpoint.
    • Retry the operation after verifying the WhatsApp client status.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions without runtime execution or external context.

Discussion