Chatwoot icon

Chatwoot

Interact with Chatwoot API

Overview

This node integrates with the Chatwoot API to manage conversations within a Chatwoot account. Specifically, the Conversation - Create operation allows users to create a new conversation in a specified inbox of an account. This is useful for initiating customer support interactions programmatically, such as when a new chat session starts or when importing conversations from another system.

Typical use cases include:

  • Automatically creating a conversation when a user submits a contact form on a website.
  • Starting a conversation thread based on an external event or trigger.
  • Assigning conversations to specific agents or teams upon creation.
  • Sending an initial message to greet or inform the customer.

For example, you might create a conversation with a source ID representing the channel (like a Facebook page or website widget), assign it to a team or agent, and send a welcome message automatically.

Properties

Name Meaning
Account ID The numeric ID of the Chatwoot account where the conversation will be created.
Source ID A string identifier representing the source/channel of the conversation (e.g., "source_123").
Inbox ID The numeric ID of the inbox within the account where the conversation should be created.
Contact ID (Optional) The numeric ID of an existing contact to associate with the conversation.
Assignee ID (Optional) The numeric ID of the agent to whom the conversation will be assigned.
Team ID (Optional) The numeric ID of the team to which the conversation will be assigned.
Initial Message (Optional) The content of the first message sent in the conversation, e.g., a greeting or prompt.
Continue on Fail Whether to continue executing subsequent items if this operation fails (boolean).

Output

The output JSON contains the full response from the Chatwoot API representing the newly created conversation object. This typically includes details such as:

  • Conversation ID
  • Associated contact information
  • Inbox and account IDs
  • Assignee and team assignments
  • Status and timestamps
  • Any custom attributes set during creation
  • The initial message if provided

No binary data is output by this operation.

Dependencies

  • Requires an active Chatwoot account with API access.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The base URL of the Chatwoot instance must be set in the credential configuration.
  • The node uses HTTP POST requests to the /api/v1/accounts/{accountId}/conversations endpoint.

Troubleshooting

  • Missing Required Fields: Ensure that Account ID, Source ID, and Inbox ID are provided; these are mandatory.
  • Invalid IDs: Using incorrect or non-existent account, inbox, contact, assignee, or team IDs will cause API errors.
  • Authentication Errors: Verify that the API key credential is valid and has sufficient permissions.
  • API Endpoint Unreachable: Confirm the base URL is correct and the Chatwoot server is accessible.
  • Continue on Fail: If enabled, the node will not stop execution on errors but will output error messages in the JSON field.

Common error messages usually come directly from the Chatwoot API and may indicate issues like unauthorized access, invalid parameters, or resource not found.

Links and References

Discussion