@renatoascencio/n8n-nodes-chatwoot 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +314 -80
- package/dist/nodes/Chatwoot/Chatwoot.node.d.ts +9 -0
- package/dist/nodes/Chatwoot/Chatwoot.node.js +383 -77
- package/dist/nodes/Chatwoot/Chatwoot.node.js.map +1 -1
- package/dist/nodes/Chatwoot/Chatwoot.node.json +22 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.d.ts +12 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.js +197 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.js.map +1 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.json +22 -0
- package/dist/nodes/Chatwoot/GenericFunctions.d.ts +5 -1
- package/dist/nodes/Chatwoot/GenericFunctions.js +71 -0
- package/dist/nodes/Chatwoot/GenericFunctions.js.map +1 -1
- package/dist/nodes/Chatwoot/chatwoot.svg +10 -6
- package/dist/nodes/Chatwoot/resources/account/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/account/get.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/account/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/account/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/account/index.js +36 -0
- package/dist/nodes/Chatwoot/resources/account/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/account/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/account/update.operation.js +75 -0
- package/dist/nodes/Chatwoot/resources/account/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/create.operation.js +95 -0
- package/dist/nodes/Chatwoot/resources/agent/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/delete.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/agent/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/agent/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/agent/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/agent/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/update.operation.js +75 -0
- package/dist/nodes/Chatwoot/resources/agent/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.js +38 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.js +28 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.js +52 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/contact/index.js +16 -0
- package/dist/nodes/Chatwoot/resources/contact/index.js.map +1 -1
- package/dist/nodes/Chatwoot/resources/contact/merge.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/contact/merge.operation.js +34 -0
- package/dist/nodes/Chatwoot/resources/contact/merge.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.js +37 -0
- package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/conversation/assign.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/conversation/assign.operation.js +87 -0
- package/dist/nodes/Chatwoot/resources/conversation/assign.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/conversation/index.js +16 -0
- package/dist/nodes/Chatwoot/resources/conversation/index.js.map +1 -1
- package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.js +122 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.js +32 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/index.js +60 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.js +64 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/inbox/get.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/inbox/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/inbox/index.js +44 -0
- package/dist/nodes/Chatwoot/resources/inbox/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/inbox/update.operation.js +143 -0
- package/dist/nodes/Chatwoot/resources/inbox/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/create.operation.js +56 -0
- package/dist/nodes/Chatwoot/resources/label/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/delete.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/label/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/label/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/label/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/label/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/update.operation.js +66 -0
- package/dist/nodes/Chatwoot/resources/label/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/create.operation.js +49 -0
- package/dist/nodes/Chatwoot/resources/team/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/delete.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/team/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/get.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/team/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/team/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/team/index.js +60 -0
- package/dist/nodes/Chatwoot/resources/team/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/update.operation.js +59 -0
- package/dist/nodes/Chatwoot/resources/team/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/create.operation.js +77 -0
- package/dist/nodes/Chatwoot/resources/webhook/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/delete.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/webhook/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/webhook/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/webhook/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/update.operation.js +59 -0
- package/dist/nodes/Chatwoot/resources/webhook/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/types.d.ts +305 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,16 +1,45 @@
|
|
|
1
1
|
# n8n-nodes-chatwoot
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@renatoascencio/n8n-nodes-chatwoot)
|
|
4
|
+
[](https://www.npmjs.com/package/@renatoascencio/n8n-nodes-chatwoot)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://docs.n8n.io/integrations/community-nodes/)
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="https://www.chatwoot.com/images/logo/logo.svg" alt="Chatwoot Logo" width="200">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
A comprehensive n8n community node for [Chatwoot](https://www.chatwoot.com/) - the open-source customer engagement platform. Automate your customer support workflows with full access to conversations, messages, contacts, agents, teams, and more.
|
|
4
13
|
|
|
5
14
|
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Highlights
|
|
19
|
+
|
|
20
|
+
- **11 Resources** - Full coverage of the Chatwoot API
|
|
21
|
+
- **45+ Operations** - Complete CRUD operations for all resources
|
|
22
|
+
- **Trigger Node** - Real-time webhook events from Chatwoot
|
|
23
|
+
- **Dynamic Dropdowns** - Auto-populated lists for agents, teams, inboxes, and labels
|
|
24
|
+
- **Smart Pagination** - Automatic handling with "Return All" option
|
|
25
|
+
- **Detailed Error Messages** - Clear feedback for troubleshooting
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Table of Contents
|
|
30
|
+
|
|
31
|
+
- [Installation](#installation)
|
|
32
|
+
- [Configuration](#configuration)
|
|
33
|
+
- [Nodes](#nodes)
|
|
34
|
+
- [Chatwoot Node](#chatwoot-node)
|
|
35
|
+
- [Chatwoot Trigger](#chatwoot-trigger)
|
|
36
|
+
- [Resources & Operations](#resources--operations)
|
|
37
|
+
- [Usage Examples](#usage-examples)
|
|
38
|
+
- [Troubleshooting](#troubleshooting)
|
|
39
|
+
- [Contributing](#contributing)
|
|
40
|
+
- [License](#license)
|
|
8
41
|
|
|
9
|
-
|
|
10
|
-
- **Messages**: Send messages and retrieve message history from conversations
|
|
11
|
-
- **Contacts**: Full CRUD operations (create, read, update, delete) plus search functionality
|
|
12
|
-
- **Pagination**: Automatic handling of paginated results with "Return All" option
|
|
13
|
-
- **Error Handling**: Clear error messages for common issues (authentication, rate limits, not found)
|
|
42
|
+
---
|
|
14
43
|
|
|
15
44
|
## Installation
|
|
16
45
|
|
|
@@ -18,122 +47,278 @@ This is an n8n community node for [Chatwoot](https://www.chatwoot.com/), the ope
|
|
|
18
47
|
|
|
19
48
|
1. Go to **Settings > Community Nodes** in your n8n instance
|
|
20
49
|
2. Select **Install**
|
|
21
|
-
3. Enter `@renatoascencio/n8n-nodes-chatwoot`
|
|
22
|
-
4.
|
|
50
|
+
3. Enter `@renatoascencio/n8n-nodes-chatwoot`
|
|
51
|
+
4. Accept the risks and select **Install**
|
|
23
52
|
|
|
24
53
|
### Manual Installation
|
|
25
54
|
|
|
26
|
-
To install this node manually in a self-hosted n8n instance:
|
|
27
|
-
|
|
28
55
|
```bash
|
|
56
|
+
# For self-hosted n8n
|
|
29
57
|
cd ~/.n8n/nodes
|
|
30
58
|
npm install @renatoascencio/n8n-nodes-chatwoot
|
|
59
|
+
|
|
60
|
+
# Restart n8n
|
|
31
61
|
```
|
|
32
62
|
|
|
33
|
-
|
|
63
|
+
### Docker
|
|
34
64
|
|
|
35
|
-
|
|
65
|
+
Add to your `docker-compose.yml`:
|
|
36
66
|
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# Install dependencies
|
|
43
|
-
npm install
|
|
44
|
-
|
|
45
|
-
# Build the node
|
|
46
|
-
npm run build
|
|
67
|
+
```yaml
|
|
68
|
+
environment:
|
|
69
|
+
- N8N_CUSTOM_EXTENSIONS=@renatoascencio/n8n-nodes-chatwoot
|
|
70
|
+
```
|
|
47
71
|
|
|
48
|
-
|
|
49
|
-
npm link
|
|
72
|
+
Or install in a running container:
|
|
50
73
|
|
|
51
|
-
|
|
52
|
-
npm
|
|
74
|
+
```bash
|
|
75
|
+
docker exec -it n8n npm install -g @renatoascencio/n8n-nodes-chatwoot
|
|
76
|
+
docker restart n8n
|
|
53
77
|
```
|
|
54
78
|
|
|
79
|
+
---
|
|
80
|
+
|
|
55
81
|
## Configuration
|
|
56
82
|
|
|
57
|
-
###
|
|
83
|
+
### Creating Credentials
|
|
58
84
|
|
|
59
|
-
1. In n8n, go to **Credentials > Add Credential
|
|
60
|
-
2.
|
|
85
|
+
1. In n8n, go to **Credentials > Add Credential**
|
|
86
|
+
2. Search for **Chatwoot API**
|
|
87
|
+
3. Fill in the required fields:
|
|
61
88
|
|
|
62
89
|
| Field | Description | Example |
|
|
63
90
|
|-------|-------------|---------|
|
|
64
|
-
| **Base URL** | Your Chatwoot instance URL | `https://app.chatwoot.com`
|
|
65
|
-
| **Account ID** | Your Chatwoot account ID | Found in
|
|
66
|
-
| **API Access Token** | Your API token | Found in Profile Settings
|
|
91
|
+
| **Base URL** | Your Chatwoot instance URL | `https://app.chatwoot.com` or `https://chatwoot.yourdomain.com` |
|
|
92
|
+
| **Account ID** | Your Chatwoot account ID | Found in URL: `/app/accounts/1/...` |
|
|
93
|
+
| **API Access Token** | Your personal API token | Found in Profile Settings |
|
|
67
94
|
|
|
68
95
|
### Getting Your API Access Token
|
|
69
96
|
|
|
70
|
-
1. Log in to
|
|
71
|
-
2. Click
|
|
97
|
+
1. Log in to Chatwoot
|
|
98
|
+
2. Click your **profile icon** (bottom left)
|
|
72
99
|
3. Go to **Profile Settings**
|
|
73
|
-
4.
|
|
74
|
-
5. Copy or
|
|
100
|
+
4. Scroll to **Access Token**
|
|
101
|
+
5. Copy or regenerate your token
|
|
102
|
+
|
|
103
|
+
> **Note**: Keep your API token secure. It provides full access to your Chatwoot account.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Nodes
|
|
108
|
+
|
|
109
|
+
### Chatwoot Node
|
|
110
|
+
|
|
111
|
+
The main node for interacting with the Chatwoot API. Supports 11 resources with full CRUD operations.
|
|
112
|
+
|
|
113
|
+
### Chatwoot Trigger
|
|
114
|
+
|
|
115
|
+
Webhook-based trigger that starts workflows when events occur in Chatwoot. Automatically registers and manages webhooks in your Chatwoot account.
|
|
116
|
+
|
|
117
|
+
**Supported Events:**
|
|
118
|
+
- `conversation_created` - New conversation started
|
|
119
|
+
- `conversation_status_changed` - Status changed (open/resolved/pending/snoozed)
|
|
120
|
+
- `conversation_updated` - Conversation modified
|
|
121
|
+
- `message_created` - New message sent or received
|
|
122
|
+
- `message_updated` - Message edited
|
|
123
|
+
- `contact_created` - New contact added
|
|
124
|
+
- `contact_updated` - Contact information changed
|
|
125
|
+
- `webwidget_triggered` - Web widget interaction
|
|
126
|
+
|
|
127
|
+
---
|
|
75
128
|
|
|
76
129
|
## Resources & Operations
|
|
77
130
|
|
|
131
|
+
### Account
|
|
132
|
+
|
|
133
|
+
Manage your Chatwoot account settings.
|
|
134
|
+
|
|
135
|
+
| Operation | Description |
|
|
136
|
+
|-----------|-------------|
|
|
137
|
+
| **Get** | Get account information |
|
|
138
|
+
| **Update** | Update account settings (name, locale, support email, auto-resolve duration) |
|
|
139
|
+
|
|
140
|
+
### Agent
|
|
141
|
+
|
|
142
|
+
Manage team members and their settings.
|
|
143
|
+
|
|
144
|
+
| Operation | Description |
|
|
145
|
+
|-----------|-------------|
|
|
146
|
+
| **Get Many** | List all agents in the account |
|
|
147
|
+
| **Create** | Add a new agent (requires email, name, role) |
|
|
148
|
+
| **Update** | Modify agent settings (role, availability, auto-offline) |
|
|
149
|
+
| **Delete** | Remove an agent from the account |
|
|
150
|
+
|
|
151
|
+
### Canned Response
|
|
152
|
+
|
|
153
|
+
Manage pre-saved response templates.
|
|
154
|
+
|
|
155
|
+
| Operation | Description |
|
|
156
|
+
|-----------|-------------|
|
|
157
|
+
| **Get Many** | List all canned responses |
|
|
158
|
+
| **Create** | Create a new canned response (short code + content) |
|
|
159
|
+
| **Update** | Modify an existing canned response |
|
|
160
|
+
| **Delete** | Remove a canned response |
|
|
161
|
+
|
|
162
|
+
### Contact
|
|
163
|
+
|
|
164
|
+
Full contact management with search and merge capabilities.
|
|
165
|
+
|
|
166
|
+
| Operation | Description |
|
|
167
|
+
|-----------|-------------|
|
|
168
|
+
| **Create** | Create a new contact (requires inbox_id) |
|
|
169
|
+
| **Get** | Retrieve a contact by ID |
|
|
170
|
+
| **Get Many** | List all contacts with pagination |
|
|
171
|
+
| **Update** | Modify contact details |
|
|
172
|
+
| **Delete** | Remove a contact |
|
|
173
|
+
| **Search** | Find contacts by name, email, phone, or identifier |
|
|
174
|
+
| **Get Conversations** | List all conversations for a contact |
|
|
175
|
+
| **Merge** | Merge two contacts into one |
|
|
176
|
+
|
|
78
177
|
### Conversation
|
|
79
178
|
|
|
179
|
+
Manage customer conversations with assignment and labeling.
|
|
180
|
+
|
|
80
181
|
| Operation | Description |
|
|
81
182
|
|-----------|-------------|
|
|
82
|
-
| **Get** | Get a single conversation
|
|
183
|
+
| **Get** | Get a single conversation with full details |
|
|
83
184
|
| **Get Many** | List conversations with filters (status, inbox, team, labels, search) |
|
|
84
|
-
| **Update Status** | Change
|
|
185
|
+
| **Update Status** | Change status to open, resolved, pending, or snoozed |
|
|
186
|
+
| **Assign** | Assign to an agent or team (with dynamic dropdowns) |
|
|
187
|
+
| **Add Labels** | Set labels on a conversation |
|
|
188
|
+
|
|
189
|
+
### Custom Attribute
|
|
190
|
+
|
|
191
|
+
Manage custom fields for contacts and conversations.
|
|
192
|
+
|
|
193
|
+
| Operation | Description |
|
|
194
|
+
|-----------|-------------|
|
|
195
|
+
| **Get Many** | List all custom attributes |
|
|
196
|
+
| **Get** | Get a specific attribute by key |
|
|
197
|
+
| **Create** | Create a new custom attribute |
|
|
198
|
+
| **Update** | Modify an existing attribute |
|
|
199
|
+
| **Delete** | Remove a custom attribute |
|
|
200
|
+
|
|
201
|
+
### Inbox
|
|
202
|
+
|
|
203
|
+
Manage communication channels.
|
|
204
|
+
|
|
205
|
+
| Operation | Description |
|
|
206
|
+
|-----------|-------------|
|
|
207
|
+
| **Get Many** | List all inboxes |
|
|
208
|
+
| **Get** | Get inbox details |
|
|
209
|
+
| **Update** | Modify inbox settings (name, greeting, auto-assignment, etc.) |
|
|
210
|
+
|
|
211
|
+
### Label
|
|
212
|
+
|
|
213
|
+
Organize conversations and contacts with labels.
|
|
214
|
+
|
|
215
|
+
| Operation | Description |
|
|
216
|
+
|-----------|-------------|
|
|
217
|
+
| **Get Many** | List all labels |
|
|
218
|
+
| **Create** | Create a new label (title, color, description) |
|
|
219
|
+
| **Update** | Modify label properties |
|
|
220
|
+
| **Delete** | Remove a label |
|
|
85
221
|
|
|
86
222
|
### Message
|
|
87
223
|
|
|
224
|
+
Send and retrieve messages in conversations.
|
|
225
|
+
|
|
88
226
|
| Operation | Description |
|
|
89
227
|
|-----------|-------------|
|
|
90
|
-
| **Create** | Send a message
|
|
91
|
-
| **Get Many** |
|
|
228
|
+
| **Create** | Send a message (supports private notes) |
|
|
229
|
+
| **Get Many** | Retrieve message history with cursor-based pagination |
|
|
92
230
|
|
|
93
|
-
###
|
|
231
|
+
### Team
|
|
232
|
+
|
|
233
|
+
Manage agent teams for conversation routing.
|
|
94
234
|
|
|
95
235
|
| Operation | Description |
|
|
96
236
|
|-----------|-------------|
|
|
97
|
-
| **
|
|
98
|
-
| **Get** | Get
|
|
99
|
-
| **
|
|
100
|
-
| **Update** |
|
|
101
|
-
| **Delete** |
|
|
102
|
-
|
|
237
|
+
| **Get Many** | List all teams |
|
|
238
|
+
| **Get** | Get team details |
|
|
239
|
+
| **Create** | Create a new team |
|
|
240
|
+
| **Update** | Modify team settings |
|
|
241
|
+
| **Delete** | Remove a team |
|
|
242
|
+
|
|
243
|
+
### Webhook
|
|
244
|
+
|
|
245
|
+
Manage webhook subscriptions programmatically.
|
|
246
|
+
|
|
247
|
+
| Operation | Description |
|
|
248
|
+
|-----------|-------------|
|
|
249
|
+
| **Get Many** | List all webhooks |
|
|
250
|
+
| **Create** | Register a new webhook URL with event subscriptions |
|
|
251
|
+
| **Update** | Modify webhook URL or subscriptions |
|
|
252
|
+
| **Delete** | Remove a webhook |
|
|
253
|
+
|
|
254
|
+
---
|
|
103
255
|
|
|
104
256
|
## Usage Examples
|
|
105
257
|
|
|
106
|
-
###
|
|
258
|
+
### Auto-Reply to New Conversations
|
|
107
259
|
|
|
108
260
|
```
|
|
109
|
-
|
|
261
|
+
Chatwoot Trigger (conversation_created)
|
|
262
|
+
→ Chatwoot (Create Message)
|
|
110
263
|
```
|
|
111
264
|
|
|
112
|
-
|
|
265
|
+
Automatically send a welcome message when a new conversation is created.
|
|
113
266
|
|
|
114
|
-
###
|
|
267
|
+
### Sync Contacts from Your CRM
|
|
115
268
|
|
|
116
269
|
```
|
|
117
|
-
CRM Trigger
|
|
270
|
+
CRM Trigger (new lead)
|
|
271
|
+
→ Chatwoot (Create Contact)
|
|
118
272
|
```
|
|
119
273
|
|
|
120
|
-
|
|
274
|
+
Keep your Chatwoot contacts in sync with your CRM.
|
|
121
275
|
|
|
122
|
-
###
|
|
276
|
+
### Close Stale Conversations
|
|
123
277
|
|
|
124
278
|
```
|
|
125
|
-
Schedule Trigger
|
|
279
|
+
Schedule Trigger (daily)
|
|
280
|
+
→ Chatwoot (Get Many Conversations: status=pending)
|
|
281
|
+
→ Filter (older than 7 days)
|
|
282
|
+
→ Chatwoot (Update Status: resolved)
|
|
126
283
|
```
|
|
127
284
|
|
|
128
|
-
|
|
285
|
+
Automatically resolve conversations that have been inactive.
|
|
129
286
|
|
|
130
|
-
###
|
|
287
|
+
### Route Conversations by Label
|
|
131
288
|
|
|
132
289
|
```
|
|
133
|
-
|
|
290
|
+
Chatwoot Trigger (conversation_updated)
|
|
291
|
+
→ IF (label = "urgent")
|
|
292
|
+
→ Chatwoot (Assign to specific team)
|
|
293
|
+
→ ELSE
|
|
294
|
+
→ Chatwoot (Assign to general team)
|
|
134
295
|
```
|
|
135
296
|
|
|
136
|
-
|
|
297
|
+
Auto-assign conversations based on labels.
|
|
298
|
+
|
|
299
|
+
### Daily Agent Performance Report
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
Schedule Trigger (daily)
|
|
303
|
+
→ Chatwoot (Get Many Conversations: resolved today)
|
|
304
|
+
→ Aggregate by agent
|
|
305
|
+
→ Email (send report)
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Generate daily performance metrics.
|
|
309
|
+
|
|
310
|
+
### Contact Merge Deduplication
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
Webhook (CRM update)
|
|
314
|
+
→ Chatwoot (Search Contact by email)
|
|
315
|
+
→ IF (multiple found)
|
|
316
|
+
→ Chatwoot (Merge Contacts)
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Automatically merge duplicate contacts.
|
|
320
|
+
|
|
321
|
+
---
|
|
137
322
|
|
|
138
323
|
## Troubleshooting
|
|
139
324
|
|
|
@@ -141,46 +326,95 @@ Search for a customer by email and update their information.
|
|
|
141
326
|
|
|
142
327
|
| Error | Cause | Solution |
|
|
143
328
|
|-------|-------|----------|
|
|
144
|
-
| **401 Unauthorized** | Invalid API token |
|
|
145
|
-
| **403 Forbidden** | Insufficient permissions |
|
|
146
|
-
| **404 Not Found** | Resource doesn't exist | Verify the ID
|
|
147
|
-
| **
|
|
329
|
+
| **401 Unauthorized** | Invalid API token | Regenerate your API Access Token |
|
|
330
|
+
| **403 Forbidden** | Insufficient permissions | Use an Administrator account or check inbox access |
|
|
331
|
+
| **404 Not Found** | Resource doesn't exist | Verify the ID is correct |
|
|
332
|
+
| **422 Unprocessable Entity** | Invalid data format | Check required fields and data types |
|
|
333
|
+
| **429 Rate Limited** | Too many requests | Wait 60 seconds (limit: 60 req/min) |
|
|
334
|
+
|
|
335
|
+
### Base URL Configuration
|
|
336
|
+
|
|
337
|
+
| Instance Type | Base URL |
|
|
338
|
+
|--------------|----------|
|
|
339
|
+
| Chatwoot Cloud | `https://app.chatwoot.com` |
|
|
340
|
+
| Self-hosted | `https://your-domain.com` |
|
|
148
341
|
|
|
149
|
-
|
|
342
|
+
> **Important**: Do not include `/api/v1` or trailing slashes.
|
|
150
343
|
|
|
151
|
-
|
|
152
|
-
- **Self-hosted**: Use your custom domain (e.g., `https://chatwoot.yourdomain.com`)
|
|
153
|
-
- **Don't** include trailing slashes or `/api/v1`
|
|
344
|
+
### Permission Levels
|
|
154
345
|
|
|
155
|
-
|
|
346
|
+
| Role | Access |
|
|
347
|
+
|------|--------|
|
|
348
|
+
| **Administrator** | All resources, all inboxes |
|
|
349
|
+
| **Agent** | Only assigned inboxes, limited operations |
|
|
156
350
|
|
|
157
|
-
|
|
158
|
-
|
|
351
|
+
### Webhook Issues
|
|
352
|
+
|
|
353
|
+
If the Chatwoot Trigger isn't receiving events:
|
|
354
|
+
|
|
355
|
+
1. Check that your n8n instance is publicly accessible
|
|
356
|
+
2. Verify the webhook was created in Chatwoot (Settings > Integrations > Webhooks)
|
|
357
|
+
3. Ensure the selected events match what Chatwoot is sending
|
|
358
|
+
4. Check n8n's execution log for incoming requests
|
|
359
|
+
|
|
360
|
+
---
|
|
159
361
|
|
|
160
362
|
## API Reference
|
|
161
363
|
|
|
162
364
|
This node uses the [Chatwoot Application API v1](https://www.chatwoot.com/developers/api/).
|
|
163
365
|
|
|
366
|
+
### API Documentation
|
|
367
|
+
|
|
368
|
+
- [Chatwoot API Reference](https://www.chatwoot.com/developers/api/)
|
|
369
|
+
- [Webhooks Documentation](https://www.chatwoot.com/docs/product/features/webhooks)
|
|
370
|
+
- [API Authentication](https://www.chatwoot.com/hc/user-guide/articles/1684764-api-access)
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
164
374
|
## Contributing
|
|
165
375
|
|
|
166
|
-
Contributions are welcome!
|
|
376
|
+
Contributions are welcome! See [CLAUDE.md](./CLAUDE.md) for development guidelines.
|
|
167
377
|
|
|
168
378
|
```bash
|
|
169
|
-
#
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
npm
|
|
173
|
-
|
|
379
|
+
# Clone and setup
|
|
380
|
+
git clone https://github.com/RenatoAscencio/n8n-nodes-chatwoot.git
|
|
381
|
+
cd n8n-nodes-chatwoot
|
|
382
|
+
npm install
|
|
383
|
+
|
|
384
|
+
# Development
|
|
385
|
+
npm run build # Compile TypeScript
|
|
386
|
+
npm run lint # Check code style
|
|
387
|
+
npm run lint:fix # Auto-fix issues
|
|
174
388
|
npm test # Run tests
|
|
175
|
-
npm run format # Format
|
|
389
|
+
npm run format # Format with Prettier
|
|
390
|
+
|
|
391
|
+
# Link for local testing
|
|
392
|
+
npm link
|
|
393
|
+
cd ~/.n8n/nodes && npm link @renatoascencio/n8n-nodes-chatwoot
|
|
176
394
|
```
|
|
177
395
|
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Changelog
|
|
399
|
+
|
|
400
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release history.
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
178
404
|
## License
|
|
179
405
|
|
|
180
|
-
[MIT](./LICENSE)
|
|
406
|
+
[MIT](./LICENSE) - See LICENSE file for details.
|
|
407
|
+
|
|
408
|
+
---
|
|
181
409
|
|
|
182
410
|
## Support
|
|
183
411
|
|
|
184
412
|
- **Issues**: [GitHub Issues](https://github.com/RenatoAscencio/n8n-nodes-chatwoot/issues)
|
|
185
|
-
- **Chatwoot Docs**: [
|
|
413
|
+
- **Chatwoot Docs**: [chatwoot.com/developers](https://www.chatwoot.com/developers/api/)
|
|
186
414
|
- **n8n Community**: [community.n8n.io](https://community.n8n.io/)
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
<p align="center">
|
|
419
|
+
Made with care for the n8n and Chatwoot communities
|
|
420
|
+
</p>
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import { getAgents, getTeams, getInboxes, getLabels } from './GenericFunctions';
|
|
2
3
|
export declare class Chatwoot implements INodeType {
|
|
3
4
|
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
loadOptions: {
|
|
7
|
+
getAgents: typeof getAgents;
|
|
8
|
+
getTeams: typeof getTeams;
|
|
9
|
+
getInboxes: typeof getInboxes;
|
|
10
|
+
getLabels: typeof getLabels;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
4
13
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
14
|
}
|