SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node integrates with the SparkBot WhatsApp API to manage team-related operations, specifically granting a user access to a WhatsApp device (number). The "Grant Device Access" operation allows administrators or managers to assign permissions for a specific team member to use or manage a particular WhatsApp number within the organization.

Common scenarios:

  • Assigning a new support agent access to a shared WhatsApp business number.
  • Managing user permissions dynamically as team roles change.
  • Automating onboarding processes by programmatically granting device access.

Practical example:
An admin wants to grant a newly hired customer service representative access to the company's main WhatsApp number so they can respond to customer inquiries. Using this node, the admin selects the WhatsApp number and the user ID of the representative, then executes the operation to grant access without manual intervention in the SparkBot dashboard.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) to which access will be granted.
User ID The ID of the user (team member) who will be granted access to the selected WhatsApp number.
  • WhatsApp Number is selected from available devices via a dynamic dropdown.
  • User ID depends on the selected WhatsApp Number and lists team agents eligible for access.

Output

The node outputs JSON data representing the result of the grant access operation. This typically includes confirmation details such as success status, updated user-device access information, or error messages if the operation fails.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the SparkBot WhatsApp API.
  • Needs an API key credential configured in n8n for authentication.
  • Dynamic loading of options for WhatsApp numbers and team users depends on API calls to SparkBot.

Troubleshooting

  • Common issues:

    • Selecting a WhatsApp number or user ID that does not exist or is invalid.
    • Insufficient permissions in the API key to modify team access.
    • Network or authentication errors when connecting to the SparkBot API.
  • Error messages:

    • Errors returned from the API will be included in the output JSON under an error field if "Continue On Fail" is enabled.
    • Typical errors include "User not found," "Device not found," or "Access denied."
  • Resolutions:

    • Verify that the WhatsApp number and user IDs are correct and currently active.
    • Ensure the API key has the necessary permissions for team management.
    • Check network connectivity and API endpoint availability.

Links and References

Discussion