SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node integrates with the SparkBot WhatsApp API to perform various operations related to WhatsApp business management. Specifically, for the Departments resource and the Get Departments operation, it retrieves a list of departments associated with a specified WhatsApp number (device). This is useful for businesses that organize their customer support or sales teams into departments and want to programmatically access department information linked to their WhatsApp numbers.

Practical examples:

  • Automatically fetching all departments for a given WhatsApp number to display in a dashboard.
  • Using department data to route incoming WhatsApp messages to the correct team.
  • Synchronizing department lists with other CRM or helpdesk systems.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) for which to retrieve the associated departments.

Output

The node outputs an array of JSON objects representing the departments linked to the specified WhatsApp number. Each object typically contains details about a department such as its identifier, name, and possibly other metadata defined by the SparkBot API.

If the node encounters an error during execution and "Continue On Fail" is enabled, the output will contain an object with an error field describing the issue.

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.
  • No additional environment variables are explicitly required beyond the API key credential.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp number ID: Ensure the provided device ID corresponds to a valid WhatsApp number registered in SparkBot.
    • Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
    • Network or API downtime: Check connectivity and SparkBot service status.
  • 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 "Internal server error".
  • Resolution tips:

    • Double-check input parameters for correctness.
    • Re-authenticate or update the API key credential if authentication fails.
    • Retry after some time if the API service is temporarily unavailable.

Links and References

Discussion