> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wsapi.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Chatwoot Bridge (n8n)

> Connect Chatwoot customer service with WhatsApp via WSAPI and n8n

The Chatwoot-WSAPI Bridge n8n Community Node connects Chatwoot's customer service platform with WSAPI's WhatsApp messaging, enabling automated customer support workflows with bidirectional messaging.

## Features

* **Bidirectional messaging** — send messages to Chatwoot and receive agent responses via webhooks
* **Contact management** — automatically create or update Chatwoot contacts from WhatsApp interactions
* **Conversation handling** — create and manage conversations with proper threading
* **AI agent compatible** — works with n8n AI agents for automated responses
* **Real-time webhooks** — instant triggers for agent messages and status updates

## Prerequisites

* n8n instance (version 0.195.0 or later)
* Active Chatwoot instance with API access
* WSAPI account with connected WhatsApp number
* Configured API channel in Chatwoot

## Installation

<Tabs>
  <Tab title="Community Nodes (Recommended)">
    <Steps>
      <Step title="Open n8n settings">
        Navigate to **Settings → Community Nodes** in your n8n instance.
      </Step>

      <Step title="Install the node">
        Click **Install Community Node** and enter:

        ```
        @wsapichat/n8n-nodes-wsapi-chatwoot
        ```
      </Step>

      <Step title="Install complete">
        The Chatwoot nodes are now available in your workflow editor.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Manual Installation">
    ```bash theme={null}
    cd /path/to/your/n8n
    npm install @wsapichat/n8n-nodes-wsapi-chatwoot
    npm run start
    ```
  </Tab>
</Tabs>

## Credentials setup

<Steps>
  <Step title="Get your Chatwoot API token">
    In Chatwoot, go to **Settings → Applications → API Access Tokens** and create a new token.
  </Step>

  <Step title="Add credentials in n8n">
    Go to **Credentials → New Credential**, select **Chatwoot API**, and enter:

    | Field                | Value                                                         |
    | -------------------- | ------------------------------------------------------------- |
    | **API Access Token** | Your Chatwoot API token                                       |
    | **Base URL**         | Your Chatwoot instance URL (e.g., `https://app.chatwoot.com`) |
  </Step>
</Steps>

## Available nodes

### Chatwoot Insert Message (Action Node)

Send messages from external systems into Chatwoot conversations. Automatically creates contacts if they don't exist and links messages to existing conversations.

| Parameter        | Description                              | Example                  |
| ---------------- | ---------------------------------------- | ------------------------ |
| **Account ID**   | Chatwoot account identifier              | `1`                      |
| **Inbox ID**     | Target inbox for the conversation        | `KYxk4lSH3l32hdlSSSS`    |
| **Identifier**   | Unique contact identifier (phone number) | `1234567890`             |
| **Message**      | Text content to send                     | `Hello, how can I help?` |
| **Contact Name** | Display name for the contact             | `John Doe`               |

### Chatwoot Callback Trigger (Webhook Node)

Receive real-time notifications when Chatwoot agents send messages, including message status updates and conversation state changes.

## Integration patterns

### WhatsApp → Chatwoot (customer messages)

```
WSAPI Trigger (WhatsApp Message)
├── Transform: Format message data
├── Chatwoot Upsert Message:
│   ├── Account ID: 1
│   ├── Inbox ID: 5
│   ├── Identifier: {{ $json.from }}
│   ├── Contact Name: {{ $json.pushName }}
│   └── Message: {{ $json.body }}
└── Log: Record interaction
```

### Chatwoot → WhatsApp (agent responses)

```
Chatwoot Callback Trigger (Agent Message)
├── Condition: Check if outgoing message
├── Transform: Extract contact identifier
├── WSAPI Send Text Message:
│   ├── To: {{ $json.contact.identifier }}@s.whatsapp.net
│   └── Message: {{ $json.message.content }}
└── Update: Mark as delivered
```

### AI-powered customer service

```
WSAPI Trigger (WhatsApp Message)
├── Chatwoot Upsert Message: Create/update conversation
├── AI Agent:
│   ├── Context: Customer service knowledge base
│   ├── Tools: Chatwoot Upsert Message, WSAPI Send Message
│   └── Action: Provide support response
└── Log: Save AI interaction
```

## Best practices

* Use webhook authentication tokens for all production deployments
* Implement error handling for failed API calls
* Set up proper agent routing rules in Chatwoot
* Test webhooks with ngrok for local development
* Monitor API rate limits (Chatwoot: 100 requests/minute per token)

## GitHub

[github.com/wsapi-chat/n8n-nodes-wsapi-chatwoot](https://github.com/wsapi-chat/n8n-nodes-wsapi-chatwoot)
