@renatoascencio/n8n-nodes-chatwoot 0.8.1 → 0.8.3

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 CHANGED
@@ -6,7 +6,7 @@
6
6
  [![n8n community node](https://img.shields.io/badge/n8n-community%20node-orange)](https://docs.n8n.io/integrations/community-nodes/)
7
7
 
8
8
  <p align="center">
9
- <img src="https://www.chatwoot.com/images/logo/logo.svg" alt="Chatwoot Logo" width="200">
9
+ <img src="https://raw.githubusercontent.com/RenatoAscencio/n8n-nodes-chatwoot/main/nodes/Chatwoot/chatwoot.svg" alt="Chatwoot Logo" width="120">
10
10
  </p>
11
11
 
12
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.
@@ -17,10 +17,12 @@ A comprehensive n8n community node for [Chatwoot](https://www.chatwoot.com/) - t
17
17
 
18
18
  ## Highlights
19
19
 
20
- - **35 Resources** - Comprehensive coverage of Application, Platform, and Public APIs
21
- - **195+ Operations** - Complete CRUD operations for all resources
22
- - **3 API Types** - Application API, Platform API, and Public API support
20
+ - **38 Resources** - Comprehensive coverage of Application, Platform, and Public APIs
21
+ - **220+ Operations** - Complete CRUD operations for all resources
22
+ - **3 API Types** - Application API (v1 + v2), Platform API, and Public API support
23
23
  - **Trigger Node** - Real-time webhook events (10 event types) from Chatwoot
24
+ - **Reports v2** - Full coverage of `/api/v2/reports`, `/live_reports`, `/summary_reports`
25
+ - **WhatsApp Templates** - Native `template_params` support for template messages
24
26
  - **Dynamic Dropdowns** - Auto-populated lists for agents, teams, inboxes, and labels
25
27
  - **Smart Pagination** - Automatic handling with "Return All" option
26
28
  - **Reports & Analytics** - Access conversation and agent statistics
@@ -132,8 +134,8 @@ Used for client-side/widget operations - creating contacts and conversations fro
132
134
 
133
135
  ### Chatwoot Node
134
136
 
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
+ The main node for interacting with Chatwoot APIs. Supports 38 resources across three API types:
138
+ - **Application API** (31 resources) - Core operations for conversations, contacts, messages, macros, notifications, campaigns, companies, SLA policies, applied SLAs, global search, reports v2, live reports, summary reports, etc.
137
139
  - **Platform API** (4 resources) - Admin operations for accounts, users, and agent bots
138
140
  - **Public API** (3 resources) - Client-side operations for widgets and external integrations
139
141
 
@@ -279,11 +281,13 @@ Send and retrieve messages in conversations.
279
281
 
280
282
  | Operation | Description |
281
283
  |-----------|-------------|
282
- | **Create** | Send a message (supports private notes) |
284
+ | **Create** | Send a message (supports private notes, WhatsApp template params, content_attributes) |
283
285
  | **Get Many** | Retrieve message history with cursor-based pagination |
284
286
  | **Update** | Update an existing message |
285
287
  | **Delete** | Delete a message |
286
288
 
289
+ > **WhatsApp template messages** (since v0.8.1): use the `template_params` JSON option with format `{"name": "template_name", "category": "MARKETING|UTILITY|AUTHENTICATION", "language": "en_US", "processed_params": {"1": "value1", "2": "value2"}}`.
290
+
287
291
  ### Team
288
292
 
289
293
  Manage agent teams for conversation routing.
@@ -349,14 +353,57 @@ Manage saved filters for conversations and contacts.
349
353
 
350
354
  ### Report
351
355
 
352
- Access analytics and reporting data.
356
+ Access analytics and reporting data via Chatwoot's `/api/v2/reports` endpoints. **Now correctly routed through v2** (was broken in v0.3.0–v0.7.x — see [v0.8.0 release notes](https://github.com/RenatoAscencio/n8n-nodes-chatwoot/releases/tag/v0.8.0)).
357
+
358
+ | Operation | Description |
359
+ |-----------|-------------|
360
+ | **Account Summary** | Period comparison summary (current vs previous) |
361
+ | **Timeseries** | Timeseries data for a metric |
362
+ | **Bot Summary** | Bot-specific summary metrics |
363
+ | **Bot Metrics** | Bot performance metrics |
364
+ | **Agent Statistics** | Per-agent summary (CSV) |
365
+ | **Inbox Statistics** | Per-inbox summary (CSV) |
366
+ | **Label Statistics** | Per-label summary (CSV) |
367
+ | **Team Statistics** | Per-team summary (CSV) |
368
+ | **Conversation Statistics** | Conversation metrics by type |
369
+ | **Conversations Summary** | Conversation summary (CSV) |
370
+ | **Conversation Traffic** | Hourly heatmap (CSV) |
371
+ | **Inbox Label Matrix** | Cross-tabulation of inboxes vs labels |
372
+ | **First Response Time Distribution** | Distribution of first response times |
373
+ | **Outgoing Messages Count** | Outgoing counts grouped by entity |
374
+ | **Year in Review** | Annual review statistics |
375
+ | **Conversation Counts** | Conversation counts by status (uses v1 `/conversations/meta`) |
376
+
377
+ ### Live Report
378
+
379
+ Real-time conversation metrics (no date range needed).
380
+
381
+ | Operation | Description |
382
+ |-----------|-------------|
383
+ | **Conversation Metrics** | Real-time counts (open, unattended, unassigned, pending) |
384
+ | **Grouped Conversation Metrics** | Real-time counts grouped by team or agent |
385
+
386
+ ### Summary Report
387
+
388
+ Per-entity summary metrics with date range (JSON, max 6-month range for channel).
389
+
390
+ | Operation | Description |
391
+ |-----------|-------------|
392
+ | **Agent Summary** | Per-agent summary metrics |
393
+ | **Team Summary** | Per-team summary metrics |
394
+ | **Inbox Summary** | Per-inbox summary metrics |
395
+ | **Label Summary** | Per-label summary metrics |
396
+ | **Channel Summary** | Per-channel summary metrics |
397
+
398
+ ### Applied SLA (Enterprise)
399
+
400
+ Track SLA compliance per conversation.
353
401
 
354
402
  | Operation | Description |
355
403
  |-----------|-------------|
356
- | **Account Summary** | Get account-level report summary |
357
- | **Agent Statistics** | Get agent conversation metrics |
358
- | **Conversation Counts** | Get conversation counts by status |
359
- | **Conversation Statistics** | Get statistics grouped by agent, inbox, team, or channel |
404
+ | **Get Many** | List applied SLAs (paginated) |
405
+ | **Metrics** | SLA hit rate metrics |
406
+ | **Download** | Export breached conversations as CSV |
360
407
 
361
408
  ### Profile
362
409
 
@@ -726,8 +726,9 @@ class Chatwoot {
726
726
  const customAttributes = this.getNodeParameter('customAttributes', i);
727
727
  const body = {
728
728
  custom_attributes: (0, GenericFunctions_1.parseJsonSafe)(customAttributes, 'custom_attributes'),
729
+ attribute_key: null,
729
730
  };
730
- responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'PATCH', `/conversations/${conversationId}`, body);
731
+ responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'POST', `/conversations/${conversationId}/custom_attributes`, body);
731
732
  }
732
733
  else if (operation === 'listLabels') {
733
734
  const conversationId = (0, GenericFunctions_1.validateId)(this.getNodeParameter('conversationId', i), 'Conversation ID');
@@ -1253,7 +1254,7 @@ class Chatwoot {
1253
1254
  const name = this.getNodeParameter('name', i);
1254
1255
  const slug = this.getNodeParameter('slug', i);
1255
1256
  const additionalFields = this.getNodeParameter('additionalFields', i);
1256
- const body = { name, slug, ...additionalFields };
1257
+ const body = { portal: { name, slug, ...additionalFields } };
1257
1258
  responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'POST', '/portals', body);
1258
1259
  }
1259
1260
  else if (operation === 'getPortal') {
@@ -1263,7 +1264,8 @@ class Chatwoot {
1263
1264
  else if (operation === 'updatePortal') {
1264
1265
  const portalSlug = this.getNodeParameter('portalSlug', i);
1265
1266
  const updateFields = this.getNodeParameter('updateFields', i);
1266
- responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'PATCH', `/portals/${portalSlug}`, updateFields);
1267
+ const body = { portal: updateFields };
1268
+ responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'PATCH', `/portals/${portalSlug}`, body);
1267
1269
  }
1268
1270
  else if (operation === 'createCategory') {
1269
1271
  const portalSlug = this.getNodeParameter('portalSlug', i);
@@ -1271,7 +1273,7 @@ class Chatwoot {
1271
1273
  const slug = this.getNodeParameter('slug', i);
1272
1274
  const locale = this.getNodeParameter('locale', i);
1273
1275
  const additionalFields = this.getNodeParameter('additionalFields', i);
1274
- const body = { name, slug, locale, ...additionalFields };
1276
+ const body = { category: { name, slug, locale, ...additionalFields } };
1275
1277
  responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'POST', `/portals/${portalSlug}/categories`, body);
1276
1278
  }
1277
1279
  else if (operation === 'createArticle') {
@@ -1279,7 +1281,7 @@ class Chatwoot {
1279
1281
  const title = this.getNodeParameter('title', i);
1280
1282
  const content = this.getNodeParameter('content', i);
1281
1283
  const additionalFields = this.getNodeParameter('additionalFields', i);
1282
- const body = { title, content, ...additionalFields };
1284
+ const body = { article: { title, content, ...additionalFields } };
1283
1285
  responseData = await GenericFunctions_1.chatwootApiRequest.call(this, 'POST', `/portals/${portalSlug}/articles`, body);
1284
1286
  }
1285
1287
  else if (operation === 'listPortals') {