ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The Assign A Conversation operation under the Conversation Assignment resource in this custom n8n node allows you to assign a specific conversation to a user or team within ChatWoot. This is useful for automating customer support workflows, such as routing incoming conversations to the appropriate agent or team based on predefined rules.

Practical examples:

  • Automatically assign new support tickets to available agents.
  • Route conversations to specialized teams based on topic or priority.
  • Reassign conversations when an agent is unavailable.

Properties

Display Name Type Description
Account Id Number The numeric ID of the account. Required to identify which ChatWoot account to operate on.
Conversation Id Number The numeric ID of the conversation to be assigned.
Assignee Id Number ID of the user (agent) to whom the conversation will be assigned.
Team Id Number ID of the team to assign the conversation to. If "Assignee Id" is provided, this is ignored.

Output

The node outputs a json object containing the result of the assignment operation from the ChatWoot API. The structure typically includes details about the updated conversation, such as its ID, current assignee, and status. The exact fields depend on the ChatWoot API response for conversation assignment.

Example output:

{
  "id": 12345,
  "status": "open",
  "assignee_id": 6789,
  "team_id": null,
  // ...other conversation fields
}

Note: The actual output fields may vary depending on the ChatWoot API version and configuration.

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 and authentication token.
  • n8n Configuration: Ensure that the node has network access to your ChatWoot server.

Troubleshooting

Common issues:

  • Invalid Account or Conversation ID: If the provided IDs do not exist, the API will return an error.
  • Missing Credentials: If the chatwootApi credential is not set up correctly, requests will fail with authentication errors.
  • Permission Denied: The authenticated user must have permission to assign conversations.

Common error messages:

  • "404 Not Found": The specified account or conversation does not exist. Double-check the IDs.
  • "401 Unauthorized": Invalid or missing API credentials. Verify your n8n credential setup.
  • "422 Unprocessable Entity": Missing required parameters or invalid values. Ensure all required fields are filled correctly.

Links and References

Discussion