SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node integrates with the SparkBot WhatsApp API to update a team member's details within a team resource. It allows modifying user attributes such as display name, email, password, role, and color. This is useful in scenarios where team management and user role adjustments are needed dynamically, for example:

  • Updating an agent’s role from "Agent" to "Supervisor" after promotion.
  • Changing a team member’s display name or email address due to rebranding or correction.
  • Resetting a user's password programmatically.

Such functionality helps automate team administration tasks in customer support or sales teams using WhatsApp via SparkBot.

Properties

Name Meaning
User ID The unique identifier (24-character hexadecimal) of the user whose information will be updated.
Update Fields Collection of fields to update for the user:
- Display Name: New display name (2-30 characters).
- Email: New email address.
- Password: New password (5-50 characters).
- Role: New role assigned to the user. Options: Admin, Supervisor, Agent.
- Color: New color associated with the user. Options include Blue, Azure, Indigo, Purple, Pink, Red, Orange, Yellow, Lime, Green, Teal, Cyan, Gray, Gray Dark.

Output

The node outputs JSON data representing the result of the update operation for each input item. Typically, this includes confirmation of the updated user details or any relevant response from the SparkBot API indicating success or failure.

No binary data output is involved.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot API endpoints related to team management.
  • Proper configuration of the API key credential in n8n is necessary for successful execution.

Troubleshooting

  • Common Issues:

    • Invalid User ID format (must be a 24-character hexadecimal string).
    • Attempting to update fields with invalid values (e.g., display name too short/long, password length constraints).
    • Insufficient permissions if the API key does not have rights to modify team members.
    • Network or authentication errors connecting to the SparkBot API.
  • Error Messages:

    • Errors returned by the API will be included in the output JSON under an error property if "Continue On Fail" is enabled.
    • Typical messages might indicate invalid parameters, unauthorized access, or user not found.
  • Resolutions:

    • Verify the User ID format and existence.
    • Ensure all updated fields meet validation criteria.
    • Confirm API key permissions and validity.
    • Check network connectivity and API endpoint availability.

Links and References

Discussion