ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The Delete Agent In Team operation for the Teams resource in this custom n8n node allows you to remove one or more agents (users) from a specified team within a ChatWoot account. This is useful for managing team memberships, such as when an agent leaves a department or needs to be reassigned. For example, if your support team changes and certain users should no longer have access to a particular team's conversations, you can automate their removal using this node.

Properties

Display Name Type Description
Account Id Number The numeric ID of the ChatWoot account. Required.
Team Id Number The ID of the team from which agents will be removed. Required.
User Ids JSON IDs of users to be deleted from the team. Should be provided as a JSON array of user IDs. Required.

Example for "User Ids":

[123, 456]

Output

  • json: The output will contain the response from the ChatWoot API after attempting to remove the specified users from the team. The structure typically includes:
    • A status indicator (e.g., success/failure)
    • Any relevant messages or errors from the API
    • Details about the updated team or affected users

Note: The exact fields depend on the ChatWoot API's response for this operation.

Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • API Credentials: You must configure the chatwootApi credentials in n8n, including the base URL and authentication token.
  • n8n Configuration: Ensure that the node has access to the necessary credentials and that the ChatWoot API endpoint is reachable from your n8n environment.

Troubleshooting

  • Common Issues:

    • Invalid Account or Team ID: If the provided Account Id or Team Id does not exist, the API will likely return an error.
    • Malformed User Ids: The "User Ids" property must be a valid JSON array of numbers. Supplying invalid JSON or non-numeric values will cause errors.
    • Insufficient Permissions: The API credentials used must have permission to modify teams and remove users.
    • Network/Connectivity Errors: If n8n cannot reach the ChatWoot API endpoint, the request will fail.
  • Error Messages & Resolutions:

    • "Invalid JSON": Ensure that the "User Ids" field contains a properly formatted JSON array.
    • "Not Found" or "404": Double-check the Account Id and Team Id values.
    • "Unauthorized" or "403": Verify that your API credentials are correct and have sufficient permissions.

Links and References

Discussion