ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

This node allows you to create a new "Contact Inbox" in ChatWoot by associating an existing contact with a specific inbox. This is useful for managing communication channels for contacts within your ChatWoot account, such as assigning a contact to a particular support or sales inbox.

Common scenarios:

  • Automatically assigning new leads to a dedicated sales inbox.
  • Routing customer queries to the appropriate support team based on their contact information.
  • Integrating external systems (like CRMs) with ChatWoot to manage contact-inbox relationships.

Example:
When a new user signs up on your website, you can use this node to automatically create a Contact Inbox in ChatWoot, ensuring all future communications are routed to the correct team.


Properties

Display Name Type Required Description
Account Id Number Yes The numeric ID of the ChatWoot account.
Id Number Yes The unique ID of the contact.
Inbox Id Number Yes The ID of the inbox to associate.
Source Id String No Optional source identifier for the inbox.

Output

The node outputs a json object containing the response from the ChatWoot API after creating the Contact Inbox. The structure typically includes details about the created association, such as IDs and status. The exact fields depend on the ChatWoot API's response for this operation.


Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • 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 or Contact ID: Ensure that both the Account Id and Contact Id exist in your ChatWoot instance.
  • Missing Credentials: If the required ChatWoot API credentials are not provided, the node will fail to connect.
  • Permission Errors: The API key used must have sufficient permissions to create contact inbox associations.
  • Incorrect Inbox Id: Providing an invalid Inbox Id will result in an error from the ChatWoot API.

Error messages and resolutions:

  • "401 Unauthorized": Check your API credentials and ensure they are correct.
  • "404 Not Found": Verify that the Account Id, Contact Id, and Inbox Id are valid and exist in ChatWoot.
  • "400 Bad Request": Make sure all required properties are filled and correctly formatted.

Links and References

Discussion