ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The Get Account Agents operation for the Agents resource in this custom n8n node allows you to retrieve a list of agents associated with a specific account from the ChatWoot API. This is useful in scenarios where you need to automate workflows involving agent management, reporting, or integration with other systems based on agent data.

Practical examples:

  • Fetching all agents for an account to assign conversations dynamically.
  • Generating reports about agent activity or availability.
  • Synchronizing agent lists between ChatWoot and external CRMs or HR systems.

Properties

Display Name Type Required Description
Account Id Number Yes The numeric ID of the account whose agents you want to retrieve.

Output

The node outputs a json field containing the list of agents for the specified account. The structure typically includes details for each agent such as their ID, name, email, role, and other relevant metadata as provided by the ChatWoot API.

Example output structure:

[
  {
    "id": 123,
    "name": "Agent Name",
    "email": "agent@example.com",
    "role": "agent",
    // ...other agent fields
  },
  // ...more agents
]

Note: The exact fields depend on the ChatWoot API response.

Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • API Key: You must provide valid ChatWoot API credentials (chatwootApi) in your n8n credentials configuration.
  • Environment Variable: The base URL for the ChatWoot instance should be set in the credentials as url.

Troubleshooting

Common issues:

  • Invalid Account Id: If the provided Account Id does not exist or is incorrect, the node may return an error or an empty list.
  • Authentication Errors: Missing or invalid API credentials will result in authentication failures.
  • Network Issues: Connectivity problems with the ChatWoot server can cause request failures.

Common error messages and resolutions:

  • "401 Unauthorized": Check that your API key and URL are correct in the credentials.
  • "404 Not Found": Ensure the Account Id exists in your ChatWoot instance.
  • "Connection timed out": Verify network connectivity to the ChatWoot server.

Links and References

Discussion