ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

This node allows you to create a new Agent Bot for a specific account in ChatWoot via the ChatWoot API. It is useful when you want to automate the provisioning of agent bots, such as setting up integrations with external services or chatbots that interact with your ChatWoot account.

Common scenarios:

  • Automatically creating bots during onboarding flows.
  • Integrating third-party AI/chatbot services with ChatWoot.
  • Managing multiple bots programmatically across different accounts.

Example:
You could use this node in an n8n workflow to provision a new support bot whenever a new client account is created in your system.

Properties

Display Name Type Required Description
Account Id Number Yes The numeric ID of the account where the agent bot will be created.
Name String No The name of the agent bot.
Description String No A description about the agent bot.
Outgoing Url String No The webhook URL for the bot (where ChatWoot will send events).

Output

The node outputs a json object containing the details of the newly created agent bot as returned by the ChatWoot API. This typically includes fields such as:

  • The unique identifier of the bot
  • The name and description provided
  • The outgoing webhook URL
  • Other metadata associated with the agent bot

Note: The exact structure depends on the ChatWoot API response for agent bot creation.

Dependencies

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

Troubleshooting

Common issues:

  • Invalid Account Id: If the provided Account Id does not exist or you lack permissions, the API will return an error.
  • Missing Credentials: If the required ChatWoot API credentials are not configured, the node will fail to execute.
  • Invalid Outgoing URL: If the webhook URL is malformed, ChatWoot may reject the request or fail to send events to your bot.

Error messages and resolutions:

  • "401 Unauthorized": Check your API key and ensure it has sufficient permissions.
  • "404 Not Found": Verify the Account Id is correct and exists in your ChatWoot instance.
  • "400 Bad Request": Ensure all required fields are filled and formatted correctly.

Links and References

Discussion