SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node interacts with the SparkBot WhatsApp API to perform various operations related to WhatsApp messaging and management. Specifically, for the Labels resource with the Get Labels operation, it retrieves the labels associated with a specified WhatsApp number (device). This is useful for organizing or categorizing chats or contacts within the WhatsApp environment managed by SparkBot.

Practical scenarios include:

  • Fetching all labels assigned to a particular WhatsApp number to display or process them in workflows.
  • Automating label-based routing or filtering of messages.
  • Integrating label data into CRM or support systems for better contact management.

Properties

Name Meaning
WhatsApp number The ID of the WhatsApp number (device) for which to retrieve labels. This must be selected from available devices loaded dynamically.

Output

The node outputs an array of JSON objects representing the labels retrieved for the specified WhatsApp number. Each object corresponds to a label with its properties as returned by the SparkBot API.

The output structure under the json field typically includes label details such as label ID, name, and possibly other metadata depending on the API response.

No binary data output is involved in 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 the provided WhatsApp number (device) being valid and active.
  • The property "WhatsApp number" uses a dynamic options loader method to fetch available devices, so proper configuration and permissions are needed for that.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp number ID will cause the operation to fail.
    • Network or authentication errors if the API key is incorrect or expired.
    • No labels found if the WhatsApp number has no labels assigned.
  • Error messages:

    • Errors from the API will be surfaced with their message; ensure the WhatsApp number exists and the API key is valid.
    • If the node throws an error about loading devices, check the credentials and network connectivity.
  • Resolution tips:

    • Verify the WhatsApp number ID is correct and currently registered in SparkBot.
    • Confirm the API key credential is properly set up and has necessary permissions.
    • Use the "Continue On Fail" option to handle cases where some inputs might not return labels without stopping the entire workflow.

Links and References

Discussion