ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The Create A Team operation for the "Teams" resource in this custom n8n node allows users to create a new team within their ChatWoot account. This is useful for organizations that want to manage support or sales teams, assign conversations automatically, and organize agents into groups for better workflow management.

Practical scenarios:

  • Setting up dedicated support teams for different products.
  • Automatically assigning incoming customer conversations to available team members.
  • Organizing agents by region, language, or expertise.

Properties

Display Name Type Description
Account Id Number The numeric ID of the ChatWoot account where the team will be created. (Required)
Name String The name of the team to be created.
Description String A description for the team, providing context or details about its purpose.
Allow Auto Assign Boolean If enabled, the system will automatically assign conversations to an agent in the team when a conversation is assigned to the team.

Output

The node outputs a json object containing the details of the newly created team as returned by the ChatWoot API. While the exact structure depends on the API response, it typically includes fields such as:

{
  "id": 123,
  "name": "Support Team",
  "description": "Handles all support queries",
  "allow_auto_assign": true,
  "account_id": 456,
  // ...other metadata fields from ChatWoot
}
  • If the API returns additional metadata or nested objects, these will also be included in the output JSON.

Dependencies

  • External Service: Requires access to a ChatWoot instance with API enabled.
  • API Credentials: You must configure the chatwootApi credential in n8n, including the base URL (url) and authentication details.
  • n8n Configuration: Ensure the node has network access to your ChatWoot server.

Troubleshooting

Common Issues:

  • Invalid Account Id: If the provided Account Id does not exist or you lack permissions, the API may return an error.
  • Missing Required Fields: Omitting required properties like Account Id or Name will result in validation errors.
  • Authentication Errors: Incorrect or missing API credentials will cause authentication failures.

Error Messages & Resolutions:

  • "401 Unauthorized": Check your API credentials and ensure they are correctly configured in n8n.
  • "404 Not Found": Verify the Account Id and the base URL for your ChatWoot instance.
  • "400 Bad Request": Ensure all required fields are filled and data types match expectations.

Links and References

Discussion