ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Agents → Add New Agent To Account

AI-generated

Overview

This node integrates with the ChatWoot API to add a new agent to a specified account. It is useful in scenarios where you want to programmatically manage agents within your customer support or chat platform, such as automating onboarding of new support staff or synchronizing user data from other systems.

For example, when a new employee joins your support team, this node can be used to create their agent profile in ChatWoot automatically by providing their name, email, role, and availability settings.

Properties

Name Meaning
Account Id The numeric ID of the account to which the new agent will be added.
Name Full name of the agent being added.
Email Email address of the agent.
Role The role assigned to the agent; options are Agent or Administrator.
Availability Status The availability state of the agent; options include Available, Busy, or Offline.
Auto Offline Boolean flag indicating if the agent's status should automatically switch to offline when away.

Output

The node outputs JSON data representing the newly created agent object as returned by the ChatWoot API. This typically includes details such as the agent's ID, name, email, role, availability status, and other metadata related to the agent profile.

No binary data output is involved.

Dependencies

  • Requires an active connection to the ChatWoot API.
  • Needs an API authentication token configured in n8n credentials for ChatWoot.
  • The base URL for the ChatWoot instance must be set in the credentials.

Troubleshooting

  • Invalid Account Id: If the provided account ID does not exist or is incorrect, the API will return an error. Verify the account ID before running the node.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Ensure the API key/token is correctly configured.
  • Email Already Exists: Attempting to add an agent with an email that already exists in the account may result in an error. Check for duplicates before adding.
  • Missing Required Fields: All required properties (Account Id, Name, Email, Role) must be provided; otherwise, the request will fail validation.

Links and References

Discussion