ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

This node allows you to update the list of agents (users) assigned to a specific inbox in ChatWoot. It is useful for managing team assignments dynamically, such as when onboarding new agents, reassigning responsibilities, or automating user management workflows within your ChatWoot account.

Practical examples:

  • Automatically add or remove support agents from an inbox based on shift schedules.
  • Sync agent assignments with another system (e.g., HR or scheduling software).
  • Bulk update inbox memberships during organizational changes.

Properties

Display Name Type Description
Account Id Number The numeric ID of the ChatWoot account.
Inbox Id String The ID of the inbox whose agents you want to update.
User Ids JSON IDs of users to be added to the inbox (as a JSON array).

Output

The output will contain the updated information about the inbox and its assigned agents. The structure typically includes:

{
  "id": "<inbox_id>",
  "name": "<inbox_name>",
  "user_ids": [<list_of_user_ids>],
  // ...other inbox properties
}
  • id: The unique identifier of the inbox.
  • name: The name of the inbox.
  • user_ids: An array of user IDs currently assigned to the inbox.
  • Additional fields may be present depending on the ChatWoot API response.

Dependencies

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

Troubleshooting

Common issues:

  • Invalid Account or Inbox ID: If the provided Account Id or Inbox Id does not exist, the node will return an error from the ChatWoot API.
  • 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.
  • Authentication Errors: If the chatwootApi credential is missing or incorrect, you may receive authentication or authorization errors.
  • Network Issues: Connectivity problems between n8n and ChatWoot can result in timeouts or failed requests.

Error messages and resolutions:

  • "Invalid JSON in 'User Ids'": Ensure you provide a properly formatted JSON array, e.g., [1,2,3].
  • "401 Unauthorized": Check your API credentials and permissions.
  • "404 Not Found": Verify the Account Id and Inbox Id are correct and exist in your ChatWoot instance.

Links and References

Discussion