SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

The node integrates with the SparkBot WhatsApp API to perform various operations related to WhatsApp groups. Specifically, the "Get Groups" operation under the "Groups" resource allows users to retrieve group chats associated with a selected WhatsApp number (device). This is useful for scenarios where you want to list or manage WhatsApp groups linked to a particular WhatsApp account.

Practical examples include:

  • Fetching all group chats of a specific WhatsApp number to display in a dashboard.
  • Filtering groups by type (e.g., standard groups vs broadcast lists) for targeted messaging or analytics.
  • Paginating through large sets of groups to process them in batches.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which to fetch groups.
Filter by Kind Filters groups by their kind; options are: "Group" (standard group chats) and "Broadcast" (broadcast lists). Only applicable when fetching device group chats.
Results Page Size Number of results to return per page when listing groups.
Page Number The page number to retrieve, starting from 0, used for pagination of group results.

Output

The node outputs JSON data representing the groups retrieved from the specified WhatsApp number. Each item in the output array corresponds to a group chat with details as provided by the SparkBot API. The exact structure depends on the API response but typically includes group identifiers, names, types (group or broadcast), and possibly metadata about participants or messages.

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 API service being accessible and properly configured.
  • The "WhatsApp Number" property must correspond to a valid registered WhatsApp device within the SparkBot system.
  • The node uses internal methods to load available devices dynamically.

Troubleshooting

  • Common Issues:

    • Invalid or missing WhatsApp number/device ID will cause the operation to fail.
    • Network or authentication errors if the API key is incorrect or expired.
    • Pagination parameters out of range may result in empty responses.
  • Error Messages:

    • Errors returned from the API will be surfaced in the node's output if "Continue On Fail" is enabled.
    • Typical error messages might include "Unauthorized", "Device not found", or "Invalid page number".
  • Resolutions:

    • Verify that the API key credential is correctly set up and has necessary permissions.
    • Ensure the WhatsApp number/device ID exists and is active.
    • Adjust pagination parameters to valid ranges.

Links and References

Discussion