@renatoascencio/n8n-nodes-chatwoot 0.6.0 → 0.6.1
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 +116 -8
- package/dist/nodes/Chatwoot/Chatwoot.node.js +23 -2
- package/dist/nodes/Chatwoot/Chatwoot.node.js.map +1 -1
- package/dist/nodes/Chatwoot/resources/contact/importContacts.operation.js +4 -7
- package/dist/nodes/Chatwoot/resources/contact/importContacts.operation.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,10 +17,10 @@ A comprehensive n8n community node for [Chatwoot](https://www.chatwoot.com/) - t
|
|
|
17
17
|
|
|
18
18
|
## Highlights
|
|
19
19
|
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
20
|
+
- **35 Resources** - Comprehensive coverage of Application, Platform, and Public APIs
|
|
21
|
+
- **195+ Operations** - Complete CRUD operations for all resources
|
|
22
22
|
- **3 API Types** - Application API, Platform API, and Public API support
|
|
23
|
-
- **Trigger Node** - Real-time webhook events from Chatwoot
|
|
23
|
+
- **Trigger Node** - Real-time webhook events (10 event types) from Chatwoot
|
|
24
24
|
- **Dynamic Dropdowns** - Auto-populated lists for agents, teams, inboxes, and labels
|
|
25
25
|
- **Smart Pagination** - Automatic handling with "Return All" option
|
|
26
26
|
- **Reports & Analytics** - Access conversation and agent statistics
|
|
@@ -132,8 +132,8 @@ Used for client-side/widget operations - creating contacts and conversations fro
|
|
|
132
132
|
|
|
133
133
|
### Chatwoot Node
|
|
134
134
|
|
|
135
|
-
The main node for interacting with Chatwoot APIs. Supports
|
|
136
|
-
- **Application API** (
|
|
135
|
+
The main node for interacting with Chatwoot APIs. Supports 35 resources across three API types:
|
|
136
|
+
- **Application API** (28 resources) - Core operations for conversations, contacts, messages, macros, notifications, campaigns, companies, SLA policies, global search, etc.
|
|
137
137
|
- **Platform API** (4 resources) - Admin operations for accounts, users, and agent bots
|
|
138
138
|
- **Public API** (3 resources) - Client-side operations for widgets and external integrations
|
|
139
139
|
|
|
@@ -141,14 +141,16 @@ The main node for interacting with Chatwoot APIs. Supports 27 resources across t
|
|
|
141
141
|
|
|
142
142
|
Webhook-based trigger that starts workflows when events occur in Chatwoot. Automatically registers and manages webhooks in your Chatwoot account.
|
|
143
143
|
|
|
144
|
-
**Supported Events:**
|
|
144
|
+
**Supported Events (10 total):**
|
|
145
|
+
- `contact_created` - New contact added
|
|
146
|
+
- `contact_updated` - Contact information changed
|
|
145
147
|
- `conversation_created` - New conversation started
|
|
146
148
|
- `conversation_status_changed` - Status changed (open/resolved/pending/snoozed)
|
|
149
|
+
- `conversation_typing_off` - Typing indicator stopped
|
|
150
|
+
- `conversation_typing_on` - Typing indicator started
|
|
147
151
|
- `conversation_updated` - Conversation modified
|
|
148
152
|
- `message_created` - New message sent or received
|
|
149
153
|
- `message_updated` - Message edited
|
|
150
|
-
- `contact_created` - New contact added
|
|
151
|
-
- `contact_updated` - Contact information changed
|
|
152
154
|
- `webwidget_triggered` - Web widget interaction
|
|
153
155
|
|
|
154
156
|
---
|
|
@@ -203,6 +205,9 @@ Full contact management with search and merge capabilities.
|
|
|
203
205
|
| **Filter** | Filter contacts with advanced criteria |
|
|
204
206
|
| **Add Labels** | Add labels to a contact |
|
|
205
207
|
| **List Labels** | Get all labels for a contact |
|
|
208
|
+
| **Import** | Import contacts from CSV file (binary upload) |
|
|
209
|
+
| **Export** | Export contacts as CSV |
|
|
210
|
+
| **Contactable Inboxes** | Get inboxes that can reach a contact |
|
|
206
211
|
|
|
207
212
|
### Conversation
|
|
208
213
|
|
|
@@ -222,6 +227,12 @@ Manage customer conversations with assignment and labeling.
|
|
|
222
227
|
| **Filter** | Filter conversations with advanced criteria |
|
|
223
228
|
| **Update Custom Attributes** | Set custom attributes on conversation |
|
|
224
229
|
| **Get Meta** | Get conversation metadata |
|
|
230
|
+
| **Mute** | Mute a conversation |
|
|
231
|
+
| **Unmute** | Unmute a conversation |
|
|
232
|
+
| **Delete** | Delete a conversation |
|
|
233
|
+
| **Search** | Search conversations by query |
|
|
234
|
+
| **Transcript** | Send conversation transcript via email |
|
|
235
|
+
| **Toggle Typing** | Show/hide typing indicator |
|
|
225
236
|
|
|
226
237
|
### Custom Attribute
|
|
227
238
|
|
|
@@ -393,6 +404,103 @@ Access customer satisfaction surveys.
|
|
|
393
404
|
| Operation | Description |
|
|
394
405
|
|-----------|-------------|
|
|
395
406
|
| **Get** | Get CSAT survey for a conversation |
|
|
407
|
+
| **Metrics** | Get CSAT survey metrics summary |
|
|
408
|
+
| **Download** | Download CSAT survey responses |
|
|
409
|
+
|
|
410
|
+
### Macro
|
|
411
|
+
|
|
412
|
+
Manage reusable action sequences.
|
|
413
|
+
|
|
414
|
+
| Operation | Description |
|
|
415
|
+
|-----------|-------------|
|
|
416
|
+
| **Get Many** | List all macros |
|
|
417
|
+
| **Get** | Retrieve a macro by ID |
|
|
418
|
+
| **Create** | Create a new macro with actions |
|
|
419
|
+
| **Update** | Modify macro settings |
|
|
420
|
+
| **Delete** | Remove a macro |
|
|
421
|
+
| **Execute** | Execute a macro on a conversation |
|
|
422
|
+
|
|
423
|
+
### Notification
|
|
424
|
+
|
|
425
|
+
Manage agent notifications.
|
|
426
|
+
|
|
427
|
+
| Operation | Description |
|
|
428
|
+
|-----------|-------------|
|
|
429
|
+
| **Get Many** | List notifications (with read/snoozed filters) |
|
|
430
|
+
| **Mark Read** | Mark a notification as read |
|
|
431
|
+
| **Mark Unread** | Mark a notification as unread |
|
|
432
|
+
| **Mark All Read** | Mark all notifications as read |
|
|
433
|
+
| **Delete** | Remove a notification |
|
|
434
|
+
| **Unread Count** | Get count of unread notifications |
|
|
435
|
+
|
|
436
|
+
### Campaign
|
|
437
|
+
|
|
438
|
+
Manage outbound campaigns.
|
|
439
|
+
|
|
440
|
+
| Operation | Description |
|
|
441
|
+
|-----------|-------------|
|
|
442
|
+
| **Get Many** | List all campaigns |
|
|
443
|
+
| **Get** | Retrieve a campaign by ID |
|
|
444
|
+
| **Create** | Create a new campaign |
|
|
445
|
+
| **Update** | Modify campaign settings |
|
|
446
|
+
| **Delete** | Remove a campaign |
|
|
447
|
+
|
|
448
|
+
### Contact Note
|
|
449
|
+
|
|
450
|
+
Manage notes on contacts.
|
|
451
|
+
|
|
452
|
+
| Operation | Description |
|
|
453
|
+
|-----------|-------------|
|
|
454
|
+
| **Get Many** | List all notes for a contact |
|
|
455
|
+
| **Create** | Create a note on a contact |
|
|
456
|
+
| **Update** | Modify a contact note |
|
|
457
|
+
| **Delete** | Remove a contact note |
|
|
458
|
+
|
|
459
|
+
### Conversation Participant
|
|
460
|
+
|
|
461
|
+
Manage conversation watchers/participants.
|
|
462
|
+
|
|
463
|
+
| Operation | Description |
|
|
464
|
+
|-----------|-------------|
|
|
465
|
+
| **Get Many** | List participants of a conversation |
|
|
466
|
+
| **Add** | Add participants to a conversation |
|
|
467
|
+
| **Remove** | Remove participants from a conversation |
|
|
468
|
+
|
|
469
|
+
### Company (Enterprise)
|
|
470
|
+
|
|
471
|
+
Manage B2B companies. Requires Chatwoot Enterprise.
|
|
472
|
+
|
|
473
|
+
| Operation | Description |
|
|
474
|
+
|-----------|-------------|
|
|
475
|
+
| **Get Many** | List all companies with sorting |
|
|
476
|
+
| **Get** | Retrieve a company by ID |
|
|
477
|
+
| **Create** | Create a new company |
|
|
478
|
+
| **Update** | Modify company settings |
|
|
479
|
+
| **Delete** | Remove a company |
|
|
480
|
+
| **Search** | Search companies by name or domain |
|
|
481
|
+
|
|
482
|
+
### SLA Policy (Enterprise)
|
|
483
|
+
|
|
484
|
+
Manage SLA policies. Requires Chatwoot Enterprise.
|
|
485
|
+
|
|
486
|
+
| Operation | Description |
|
|
487
|
+
|-----------|-------------|
|
|
488
|
+
| **Get Many** | List all SLA policies |
|
|
489
|
+
| **Get** | Retrieve an SLA policy by ID |
|
|
490
|
+
| **Create** | Create an SLA policy with thresholds |
|
|
491
|
+
| **Update** | Modify SLA policy settings |
|
|
492
|
+
| **Delete** | Remove an SLA policy |
|
|
493
|
+
|
|
494
|
+
### Search (Global)
|
|
495
|
+
|
|
496
|
+
Search across all entities.
|
|
497
|
+
|
|
498
|
+
| Operation | Description |
|
|
499
|
+
|-----------|-------------|
|
|
500
|
+
| **Search All** | Search across conversations, contacts, and messages |
|
|
501
|
+
| **Search Conversations** | Search conversations only |
|
|
502
|
+
| **Search Contacts** | Search contacts only |
|
|
503
|
+
| **Search Messages** | Search messages only |
|
|
396
504
|
|
|
397
505
|
---
|
|
398
506
|
|
|
@@ -958,8 +958,29 @@ class Chatwoot {
|
|
|
958
958
|
responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'GET', `/contacts/${contactId}/labels`);
|
|
959
959
|
}
|
|
960
960
|
else if (operation === 'import') {
|
|
961
|
-
const
|
|
962
|
-
|
|
961
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
962
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
963
|
+
const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
964
|
+
const credentials = await this.getCredentials('chatwootApi');
|
|
965
|
+
const baseUrl = credentials.baseUrl.trim().replace(/\/+$/, '');
|
|
966
|
+
const accountId = credentials.accountId;
|
|
967
|
+
responseData = (await this.helpers.httpRequest({
|
|
968
|
+
method: 'POST',
|
|
969
|
+
url: `${baseUrl}/api/v1/accounts/${accountId}/contacts/import`,
|
|
970
|
+
headers: {
|
|
971
|
+
api_access_token: credentials.apiAccessToken,
|
|
972
|
+
},
|
|
973
|
+
body: {
|
|
974
|
+
import_file: {
|
|
975
|
+
value: buffer,
|
|
976
|
+
options: {
|
|
977
|
+
filename: binaryData.fileName || 'contacts.csv',
|
|
978
|
+
contentType: binaryData.mimeType || 'text/csv',
|
|
979
|
+
},
|
|
980
|
+
},
|
|
981
|
+
},
|
|
982
|
+
json: true,
|
|
983
|
+
}));
|
|
963
984
|
}
|
|
964
985
|
else if (operation === 'export') {
|
|
965
986
|
const options = this.getNodeParameter('options', i);
|