n8n-nodes-tukimate 1.6.7 → 1.7.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.
@@ -24,6 +24,7 @@ const RESOURCES = {
24
24
  TAG_DEFINITION: 'tagDefinition',
25
25
  CATEGORY: 'category',
26
26
  ANALYSIS: 'analysis',
27
+ ANALYSIS_JOB: 'analysisJob',
27
28
  OPPORTUNITY: 'opportunity',
28
29
  USAGE: 'usage',
29
30
  };
@@ -35,6 +36,8 @@ const OPERATIONS = {
35
36
  UPDATE: 'update',
36
37
  DELETE: 'delete',
37
38
  ANALYZE: 'analyze',
39
+ BULK_ANALYZE: 'bulkAnalyze',
40
+ BULK_DELETE: 'bulkDelete',
38
41
  };
39
42
  // Helper to make API requests
40
43
  async function tukiMateRequest(method, endpoint, body, query) {
@@ -190,6 +193,7 @@ const SIMPLIFIED_FIELDS = {
190
193
  category: ['id', 'key', 'label', 'active'],
191
194
  opportunity: ['id', 'title', 'type', 'status', 'confidence', 'estimated_value', 'currency', 'description', 'expected_close_date', 'conversation_id'],
192
195
  analysis: ['id', 'conversation_id', 'status', 'type', 'result'],
196
+ analysisJob: ['id', 'type', 'status', 'conversation_ids', 'created_at', 'completed_at'],
193
197
  };
194
198
  // Response wrapper keys for list endpoints
195
199
  const RESPONSE_WRAPPERS = {
@@ -200,6 +204,7 @@ const RESPONSE_WRAPPERS = {
200
204
  category: 'categories',
201
205
  opportunity: 'opportunities',
202
206
  analysis: 'analyses',
207
+ analysisJob: 'data',
203
208
  };
204
209
  // Fields to always exclude
205
210
  const EXCLUDED_FIELDS = ['tenant_id', 'created_at', 'updated_at', 'deleted_at'];
@@ -269,6 +274,7 @@ class TukiMate {
269
274
  { name: 'Tag', value: RESOURCES.TAG_DEFINITION },
270
275
  { name: 'Category', value: RESOURCES.CATEGORY },
271
276
  { name: 'Analysis', value: RESOURCES.ANALYSIS },
277
+ { name: 'Analysis Job', value: RESOURCES.ANALYSIS_JOB },
272
278
  { name: 'Usage', value: RESOURCES.USAGE },
273
279
  { name: 'Opportunity', value: RESOURCES.OPPORTUNITY },
274
280
  ],
@@ -292,6 +298,8 @@ class TukiMate {
292
298
  { name: 'Create', value: OPERATIONS.CREATE, description: 'Create a new conversation', action: 'Create a conversation' },
293
299
  { name: 'Update', value: OPERATIONS.UPDATE, description: 'Update a conversation', action: 'Update a conversation' },
294
300
  { name: 'Analyze', value: OPERATIONS.ANALYZE, description: 'Trigger AI analysis on a conversation', action: 'Analyze a conversation' },
301
+ { name: 'Bulk Analyze', value: OPERATIONS.BULK_ANALYZE, description: 'Trigger AI analysis on multiple conversations', action: 'Bulk analyze conversations' },
302
+ { name: 'Bulk Delete', value: OPERATIONS.BULK_DELETE, description: 'Delete multiple conversations', action: 'Bulk delete conversations' },
295
303
  ],
296
304
  default: OPERATIONS.LIST,
297
305
  },
@@ -2457,6 +2465,205 @@ class TukiMate {
2457
2465
  default: 'desc',
2458
2466
  description: 'Sort order',
2459
2467
  },
2468
+ // Analysis: Create fields
2469
+ {
2470
+ displayName: 'Conversation ID',
2471
+ name: 'analysisCreateConversationId',
2472
+ type: 'string',
2473
+ required: true,
2474
+ displayOptions: {
2475
+ show: {
2476
+ resource: [RESOURCES.ANALYSIS],
2477
+ operation: [OPERATIONS.CREATE],
2478
+ },
2479
+ },
2480
+ default: '',
2481
+ description: 'The ID of the conversation to analyze',
2482
+ },
2483
+ {
2484
+ displayName: 'Summary',
2485
+ name: 'analysisSummary',
2486
+ type: 'string',
2487
+ displayOptions: {
2488
+ show: {
2489
+ resource: [RESOURCES.ANALYSIS],
2490
+ operation: [OPERATIONS.CREATE],
2491
+ },
2492
+ },
2493
+ default: '',
2494
+ description: 'Manual summary of the analysis',
2495
+ typeOptions: {
2496
+ rows: 4,
2497
+ },
2498
+ },
2499
+ {
2500
+ displayName: 'Sentiment',
2501
+ name: 'analysisSentiment',
2502
+ type: 'options',
2503
+ displayOptions: {
2504
+ show: {
2505
+ resource: [RESOURCES.ANALYSIS],
2506
+ operation: [OPERATIONS.CREATE],
2507
+ },
2508
+ },
2509
+ options: [
2510
+ { name: 'None', value: '' },
2511
+ { name: 'Positive', value: 'positive' },
2512
+ { name: 'Negative', value: 'negative' },
2513
+ { name: 'Neutral', value: 'neutral' },
2514
+ { name: 'Mixed', value: 'mixed' },
2515
+ ],
2516
+ default: '',
2517
+ description: 'Sentiment of the analysis',
2518
+ },
2519
+ {
2520
+ displayName: 'Topics',
2521
+ name: 'analysisTopics',
2522
+ type: 'string',
2523
+ displayOptions: {
2524
+ show: {
2525
+ resource: [RESOURCES.ANALYSIS],
2526
+ operation: [OPERATIONS.CREATE],
2527
+ },
2528
+ },
2529
+ default: '',
2530
+ description: 'Comma-separated topics',
2531
+ },
2532
+ {
2533
+ displayName: 'Action Items',
2534
+ name: 'analysisActionItems',
2535
+ type: 'fixedCollection',
2536
+ typeOptions: {
2537
+ multipleValues: true,
2538
+ },
2539
+ displayOptions: {
2540
+ show: {
2541
+ resource: [RESOURCES.ANALYSIS],
2542
+ operation: [OPERATIONS.CREATE],
2543
+ },
2544
+ },
2545
+ default: {},
2546
+ options: [
2547
+ {
2548
+ name: 'actionItem',
2549
+ displayName: 'Action Item',
2550
+ values: [
2551
+ { displayName: 'Title', name: 'title', type: 'string', default: '' },
2552
+ { displayName: 'Assignee', name: 'assignee', type: 'string', default: '' },
2553
+ { displayName: 'Status', name: 'status', type: 'string', default: 'pending' },
2554
+ ],
2555
+ },
2556
+ ],
2557
+ description: 'Action items from the analysis',
2558
+ },
2559
+ // ==================== ANALYSIS JOB ====================
2560
+ {
2561
+ displayName: 'Operation',
2562
+ name: 'operation',
2563
+ type: 'options',
2564
+ noDataExpression: true,
2565
+ displayOptions: {
2566
+ show: {
2567
+ resource: [RESOURCES.ANALYSIS_JOB],
2568
+ },
2569
+ },
2570
+ options: [
2571
+ { name: 'List', value: OPERATIONS.LIST, description: 'Get a list of analysis jobs', action: 'List analysis jobs' },
2572
+ { name: 'Get', value: OPERATIONS.GET, description: 'Get a single analysis job', action: 'Get an analysis job' },
2573
+ ],
2574
+ default: OPERATIONS.LIST,
2575
+ },
2576
+ {
2577
+ displayName: 'Job ID',
2578
+ name: 'analysisJobId',
2579
+ type: 'string',
2580
+ required: true,
2581
+ displayOptions: {
2582
+ show: {
2583
+ resource: [RESOURCES.ANALYSIS_JOB],
2584
+ operation: [OPERATIONS.GET],
2585
+ },
2586
+ },
2587
+ default: '',
2588
+ description: 'The ID of the analysis job',
2589
+ },
2590
+ {
2591
+ displayName: 'Status Filter',
2592
+ name: 'analysisJobStatus',
2593
+ type: 'options',
2594
+ displayOptions: {
2595
+ show: {
2596
+ resource: [RESOURCES.ANALYSIS_JOB],
2597
+ operation: [OPERATIONS.LIST],
2598
+ },
2599
+ },
2600
+ options: [
2601
+ { name: 'All', value: '' },
2602
+ { name: 'Queued', value: 'QUEUED' },
2603
+ { name: 'Processing', value: 'PROCESSING' },
2604
+ { name: 'Completed', value: 'COMPLETED' },
2605
+ { name: 'Failed', value: 'FAILED' },
2606
+ ],
2607
+ default: '',
2608
+ description: 'Filter by job status',
2609
+ },
2610
+ {
2611
+ displayName: 'Type Filter',
2612
+ name: 'analysisJobType',
2613
+ type: 'options',
2614
+ displayOptions: {
2615
+ show: {
2616
+ resource: [RESOURCES.ANALYSIS_JOB],
2617
+ operation: [OPERATIONS.LIST],
2618
+ },
2619
+ },
2620
+ options: [
2621
+ { name: 'All', value: '' },
2622
+ { name: 'Single', value: 'SINGLE' },
2623
+ { name: 'Bulk', value: 'BULK' },
2624
+ ],
2625
+ default: '',
2626
+ description: 'Filter by job type',
2627
+ },
2628
+ {
2629
+ displayName: 'Search',
2630
+ name: 'analysisJobSearch',
2631
+ type: 'string',
2632
+ displayOptions: {
2633
+ show: {
2634
+ resource: [RESOURCES.ANALYSIS_JOB],
2635
+ operation: [OPERATIONS.LIST],
2636
+ },
2637
+ },
2638
+ default: '',
2639
+ description: 'Search term',
2640
+ },
2641
+ {
2642
+ displayName: 'Page',
2643
+ name: 'analysisJobPage',
2644
+ type: 'number',
2645
+ displayOptions: {
2646
+ show: {
2647
+ resource: [RESOURCES.ANALYSIS_JOB],
2648
+ operation: [OPERATIONS.LIST],
2649
+ },
2650
+ },
2651
+ default: 1,
2652
+ description: 'Page number',
2653
+ },
2654
+ {
2655
+ displayName: 'Page Size',
2656
+ name: 'analysisJobPageSize',
2657
+ type: 'number',
2658
+ displayOptions: {
2659
+ show: {
2660
+ resource: [RESOURCES.ANALYSIS_JOB],
2661
+ operation: [OPERATIONS.LIST],
2662
+ },
2663
+ },
2664
+ default: 20,
2665
+ description: 'Results per page (max 100)',
2666
+ },
2460
2667
  // ==================== USAGE ====================
2461
2668
  {
2462
2669
  displayName: 'Operation',
@@ -2781,7 +2988,7 @@ class TukiMate {
2781
2988
  type: 'boolean',
2782
2989
  displayOptions: {
2783
2990
  show: {
2784
- resource: [RESOURCES.CONVERSATION, RESOURCES.CONTACT, RESOURCES.TEAM, RESOURCES.PROJECT, RESOURCES.CLIENT, RESOURCES.SOURCE, RESOURCES.TAG, RESOURCES.TAG_DEFINITION],
2991
+ resource: [RESOURCES.CONVERSATION, RESOURCES.CONTACT, RESOURCES.TEAM, RESOURCES.PROJECT, RESOURCES.CLIENT, RESOURCES.SOURCE, RESOURCES.TAG, RESOURCES.TAG_DEFINITION, RESOURCES.CATEGORY, RESOURCES.ANALYSIS, RESOURCES.ANALYSIS_JOB, RESOURCES.OPPORTUNITY],
2785
2992
  operation: [OPERATIONS.LIST, OPERATIONS.GET],
2786
2993
  },
2787
2994
  },
@@ -2973,6 +3180,31 @@ class TukiMate {
2973
3180
  }
2974
3181
  responseData = await tukiMateRequest.call(this, 'POST', `/conversations/${conversationId}/analyze`, body);
2975
3182
  }
3183
+ else if (operation === OPERATIONS.BULK_ANALYZE) {
3184
+ const bulkConversationIds = this.getNodeParameter('bulkConversationIds', i);
3185
+ const bulkAnalysisConfigIds = this.getNodeParameter('bulkAnalysisConfigIds', i);
3186
+ const bulkAnalyzeMode = this.getNodeParameter('bulkAnalyzeMode', i, 'individual');
3187
+ const bulkAnalyzeTitle = this.getNodeParameter('bulkAnalyzeTitle', i, '');
3188
+ const bulkAnalyzeDescription = this.getNodeParameter('bulkAnalyzeDescription', i, '');
3189
+ const body = {
3190
+ conversationIds: bulkConversationIds.split(',').map(id => id.trim()),
3191
+ analysisConfigIds: bulkAnalysisConfigIds.split(',').map(id => id.trim()),
3192
+ mode: bulkAnalyzeMode,
3193
+ };
3194
+ if (bulkAnalyzeTitle)
3195
+ body.title = bulkAnalyzeTitle;
3196
+ if (bulkAnalyzeDescription)
3197
+ body.description = bulkAnalyzeDescription;
3198
+ responseData = await tukiMateRequest.call(this, 'POST', '/conversations/bulk-analyze', body);
3199
+ }
3200
+ else if (operation === OPERATIONS.BULK_DELETE) {
3201
+ const bulkConversationIds = this.getNodeParameter('bulkConversationIds', i);
3202
+ const body = {
3203
+ action: 'delete',
3204
+ ids: bulkConversationIds.split(',').map(id => id.trim()),
3205
+ };
3206
+ responseData = await tukiMateRequest.call(this, 'POST', '/conversations/bulk', body);
3207
+ }
2976
3208
  }
2977
3209
  // ==================== CONTACT ====================
2978
3210
  else if (resource === RESOURCES.CONTACT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-tukimate",
3
- "version": "1.6.7",
3
+ "version": "1.7.0",
4
4
  "description": "n8n community node for TukiMate API",
5
5
  "keywords": [
6
6
  "n8n",