ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Account Agent Bots → Create An Account Agent Bot

AI-generated

Overview

This node allows users to create a new Account Agent Bot within the ChatWoot platform. An Account Agent Bot is an automated agent configured to interact with customers on behalf of an account, typically used for automating responses, handling common queries, or integrating external webhook logic.

Common scenarios where this node is beneficial include:

  • Automating customer support by creating bots that respond to messages.
  • Integrating custom business logic via webhooks to handle conversations dynamically.
  • Quickly setting up new agent bots programmatically as part of onboarding or scaling processes.

For example, a user can create an agent bot named "SupportBot" with a description and specify a webhook URL that will receive events from ChatWoot to process incoming messages automatically.

Properties

Name Meaning
Account Id The numeric ID of the ChatWoot account under which the agent bot will be created.
Name The name assigned to the agent bot (e.g., "SupportBot").
Description A textual description providing details about the purpose or role of the agent bot.
Outgoing Url The webhook URL where the bot will send outgoing requests or receive event callbacks.

Output

The node outputs JSON data representing the newly created Account Agent Bot object as returned by the ChatWoot API. This typically includes details such as the bot's unique identifier, name, description, associated account ID, and webhook URL.

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Invalid Account Id: If the provided account ID does not exist or the authenticated user lacks permission, the API will return an error. Verify the account ID and permissions.
  • Missing Required Fields: The "Account Id" is mandatory; omitting it will cause the request to fail.
  • Webhook URL Issues: Ensure the outgoing URL is reachable and correctly formatted; otherwise, the bot may not function as expected.
  • Authentication Errors: Check that the API key/token is valid and has sufficient scopes to create agent bots.
  • API Rate Limits: Excessive requests might lead to rate limiting; implement retries or backoff strategies if needed.

Links and References

Discussion