ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

This node allows you to update an existing Agent Bot for a specific account in ChatWoot via the "Update An Account Agent Bot" operation. It is useful when you need to programmatically modify the details of an agent bot, such as its name, description, or webhook URL, within your automated workflows. For example, you might use this node to keep bot information synchronized with another system or to automate updates based on external triggers.

Properties

Display Name Type Description
Account Id Number The numeric ID of the account.
Id Number The ID of the agentbot to be updated.
Name String The name of the agent bot.
Description String The description about the agent bot.
Outgoing Url String The webhook URL for the bot.

All properties are required except for "Name", "Description", and "Outgoing Url", which can be optionally provided to update those specific fields.

Output

The output will be a JSON object representing the updated agent bot. The structure typically includes fields such as:

{
  "id": 123,
  "account_id": 456,
  "name": "Updated Bot Name",
  "description": "New description",
  "outgoing_url": "https://webhook.example.com",
  // ...other agent bot fields as returned by the ChatWoot API
}

No binary data is produced by this node.

Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • API Credentials: Needs a configured chatwootApi credential in n8n, including the base URL (url) and authentication details.
  • n8n Configuration: Ensure the credentials are set up in n8n under the name chatwootApi.

Troubleshooting

  • Missing or Invalid Credentials:
    Error: "401 Unauthorized" or similar.
    Resolution: Check that your chatwootApi credentials are correctly configured and have permission to update agent bots.

  • Invalid Account or Bot ID:
    Error: "404 Not Found" or "400 Bad Request".
    Resolution: Verify that both the "Account Id" and "Id" correspond to valid entities in your ChatWoot instance.

  • Required Fields Missing:
    Error: "400 Bad Request" indicating missing parameters.
    Resolution: Ensure all required fields ("Account Id" and "Id") are provided.

  • Network/Connection Issues:
    Error: "ENOTFOUND", "ECONNREFUSED", etc.
    Resolution: Confirm that the ChatWoot server URL is correct and reachable from your n8n instance.

Links and References

Discussion