n8n-nodes-bgos 0.3.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.
Files changed (36) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +63 -0
  4. package/dist/credentials/BgosApi.credentials.d.ts +9 -0
  5. package/dist/credentials/BgosApi.credentials.js +42 -0
  6. package/dist/icons/bgos.png +0 -0
  7. package/dist/icons/bgos.svg +5 -0
  8. package/dist/nodes/BGOSAction/BGOSAction.node.d.ts +5 -0
  9. package/dist/nodes/BGOSAction/BGOSAction.node.js +141 -0
  10. package/dist/nodes/BGOSAction/EventTypes.d.ts +21 -0
  11. package/dist/nodes/BGOSAction/EventTypes.js +25 -0
  12. package/dist/nodes/BGOSAction/agentWebhook.d.ts +1 -0
  13. package/dist/nodes/BGOSAction/agentWebhook.js +66 -0
  14. package/dist/nodes/BGOSAction/handler/eventHandler.d.ts +12 -0
  15. package/dist/nodes/BGOSAction/handler/eventHandler.js +137 -0
  16. package/dist/nodes/BGOSAction/rateLimiter.d.ts +2 -0
  17. package/dist/nodes/BGOSAction/rateLimiter.js +37 -0
  18. package/dist/nodes/BGOSAction/techWebhook.d.ts +43 -0
  19. package/dist/nodes/BGOSAction/techWebhook.js +133 -0
  20. package/dist/nodes/Bgos/Bgos.node.d.ts +4 -0
  21. package/dist/nodes/Bgos/Bgos.node.js +64 -0
  22. package/dist/nodes/Bgos/resources/assistant/index.d.ts +3 -0
  23. package/dist/nodes/Bgos/resources/assistant/index.js +362 -0
  24. package/dist/nodes/Bgos/resources/chat/index.d.ts +3 -0
  25. package/dist/nodes/Bgos/resources/chat/index.js +286 -0
  26. package/dist/nodes/Bgos/resources/message/index.d.ts +3 -0
  27. package/dist/nodes/Bgos/resources/message/index.js +881 -0
  28. package/dist/nodes/Bgos/resources/scheduledTask/index.d.ts +3 -0
  29. package/dist/nodes/Bgos/resources/scheduledTask/index.js +85 -0
  30. package/dist/nodes/Bgos/resources/user/index.d.ts +3 -0
  31. package/dist/nodes/Bgos/resources/user/index.js +158 -0
  32. package/dist/nodes/BgosTrigger/BgosTrigger.node.d.ts +12 -0
  33. package/dist/nodes/BgosTrigger/BgosTrigger.node.js +142 -0
  34. package/dist/nodes/BgosTrigger/stubs.d.ts +4 -0
  35. package/dist/nodes/BgosTrigger/stubs.js +86 -0
  36. package/package.json +71 -0
@@ -0,0 +1,881 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageFields = exports.messageOperations = void 0;
4
+ exports.messageOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['message'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Send Message',
18
+ value: 'sendMessage',
19
+ description: 'Send a message via assistant webhook pipeline',
20
+ routing: {
21
+ request: {
22
+ method: 'POST',
23
+ url: '/api/v1/send-message',
24
+ },
25
+ },
26
+ action: 'Send a message',
27
+ },
28
+ {
29
+ name: 'Create Message',
30
+ value: 'createMessage',
31
+ description: 'Create a message directly in a chat',
32
+ routing: {
33
+ request: {
34
+ method: 'POST',
35
+ url: '/api/v1/messages',
36
+ },
37
+ },
38
+ action: 'Create a message',
39
+ },
40
+ {
41
+ name: 'Bulk Create Messages',
42
+ value: 'bulkCreateMessages',
43
+ description: 'Create multiple messages at once',
44
+ routing: {
45
+ request: {
46
+ method: 'POST',
47
+ url: '/api/v1/messages/bulk',
48
+ },
49
+ },
50
+ action: 'Bulk create messages',
51
+ },
52
+ {
53
+ name: 'Edit Message',
54
+ value: 'editMessage',
55
+ description: 'Edit an existing message',
56
+ routing: {
57
+ request: {
58
+ method: 'PATCH',
59
+ url: '=/api/v1/messages/{{$parameter.messageId}}',
60
+ },
61
+ },
62
+ action: 'Edit a message',
63
+ },
64
+ {
65
+ name: 'Delete Message',
66
+ value: 'deleteMessage',
67
+ description: 'Delete a message',
68
+ routing: {
69
+ request: {
70
+ method: 'DELETE',
71
+ url: '=/api/v1/messages/{{$parameter.messageId}}',
72
+ },
73
+ },
74
+ action: 'Delete a message',
75
+ },
76
+ {
77
+ name: 'Button Callback',
78
+ value: 'buttonCallback',
79
+ description: 'Trigger a button callback on a message',
80
+ routing: {
81
+ request: {
82
+ method: 'POST',
83
+ url: '=/api/v1/messages/{{$parameter.messageId}}/callback',
84
+ },
85
+ },
86
+ action: 'Trigger button callback',
87
+ },
88
+ {
89
+ name: 'Send Webhook Message',
90
+ value: 'sendWebhookMessage',
91
+ description: 'Send a message via webhook (saves to DB + pushes via WebSocket for real-time)',
92
+ routing: {
93
+ request: {
94
+ method: 'POST',
95
+ url: '/webhook/message',
96
+ },
97
+ },
98
+ action: 'Send a webhook message',
99
+ },
100
+ {
101
+ name: 'Edit Webhook Message',
102
+ value: 'editWebhookMessage',
103
+ description: 'Edit a message via webhook (updates DB + pushes via WebSocket for real-time)',
104
+ routing: {
105
+ request: {
106
+ method: 'POST',
107
+ url: '/webhook/edited_message',
108
+ },
109
+ },
110
+ action: 'Edit a webhook message',
111
+ },
112
+ ],
113
+ default: 'sendMessage',
114
+ },
115
+ ];
116
+ exports.messageFields = [
117
+ // --- messageId (shared by editMessage, deleteMessage, buttonCallback) ---
118
+ {
119
+ displayName: 'Message ID',
120
+ name: 'messageId',
121
+ type: 'number',
122
+ required: true,
123
+ default: 0,
124
+ displayOptions: {
125
+ show: {
126
+ resource: ['message'],
127
+ operation: ['editMessage', 'deleteMessage', 'buttonCallback'],
128
+ },
129
+ },
130
+ description: 'The ID of the message',
131
+ },
132
+ // --- sendMessage fields ---
133
+ {
134
+ displayName: 'Assistant ID',
135
+ name: 'assistantId',
136
+ type: 'string',
137
+ required: true,
138
+ default: '',
139
+ displayOptions: {
140
+ show: {
141
+ resource: ['message'],
142
+ operation: ['sendMessage'],
143
+ },
144
+ },
145
+ routing: {
146
+ send: {
147
+ type: 'body',
148
+ property: 'assistantId',
149
+ },
150
+ },
151
+ description: 'The assistant ID to send the message through',
152
+ },
153
+ {
154
+ displayName: 'Chat ID',
155
+ name: 'chatId',
156
+ type: 'number',
157
+ required: true,
158
+ default: 0,
159
+ displayOptions: {
160
+ show: {
161
+ resource: ['message'],
162
+ operation: ['sendMessage'],
163
+ },
164
+ },
165
+ routing: {
166
+ send: {
167
+ type: 'body',
168
+ property: 'chatId',
169
+ },
170
+ },
171
+ description: 'The chat ID',
172
+ },
173
+ {
174
+ displayName: 'Text',
175
+ name: 'text',
176
+ type: 'string',
177
+ typeOptions: { rows: 4 },
178
+ required: true,
179
+ default: '',
180
+ displayOptions: {
181
+ show: {
182
+ resource: ['message'],
183
+ operation: ['sendMessage'],
184
+ },
185
+ },
186
+ routing: {
187
+ send: {
188
+ type: 'body',
189
+ property: 'text',
190
+ },
191
+ },
192
+ description: 'The message text',
193
+ },
194
+ {
195
+ displayName: 'Additional Fields',
196
+ name: 'additionalFields',
197
+ type: 'collection',
198
+ placeholder: 'Add Field',
199
+ default: {},
200
+ displayOptions: {
201
+ show: {
202
+ resource: ['message'],
203
+ operation: ['sendMessage'],
204
+ },
205
+ },
206
+ options: [
207
+ {
208
+ displayName: 'Sender',
209
+ name: 'sender',
210
+ type: 'options',
211
+ default: 'user',
212
+ options: [
213
+ { name: 'User', value: 'user' },
214
+ { name: 'Assistant', value: 'assistant' },
215
+ ],
216
+ routing: { send: { type: 'body', property: 'sender' } },
217
+ },
218
+ {
219
+ displayName: 'Has Attachment',
220
+ name: 'hasAttachment',
221
+ type: 'boolean',
222
+ default: false,
223
+ routing: { send: { type: 'body', property: 'hasAttachment' } },
224
+ },
225
+ {
226
+ displayName: 'Audio Duration',
227
+ name: 'audioDuration',
228
+ type: 'number',
229
+ default: 0,
230
+ routing: { send: { type: 'body', property: 'audioDuration' } },
231
+ },
232
+ {
233
+ displayName: 'Artifact Code',
234
+ name: 'artifactCode',
235
+ type: 'string',
236
+ default: '',
237
+ routing: { send: { type: 'body', property: 'artifactCode' } },
238
+ },
239
+ {
240
+ displayName: 'Is Code',
241
+ name: 'isCode',
242
+ type: 'boolean',
243
+ default: false,
244
+ routing: { send: { type: 'body', property: 'isCode' } },
245
+ },
246
+ {
247
+ displayName: 'Is Article',
248
+ name: 'isArticle',
249
+ type: 'boolean',
250
+ default: false,
251
+ routing: { send: { type: 'body', property: 'isArticle' } },
252
+ },
253
+ {
254
+ displayName: 'Article Text',
255
+ name: 'articleText',
256
+ type: 'string',
257
+ default: '',
258
+ routing: { send: { type: 'body', property: 'articleText' } },
259
+ },
260
+ {
261
+ displayName: 'Is Multi Response',
262
+ name: 'isMultiResponse',
263
+ type: 'boolean',
264
+ default: false,
265
+ routing: { send: { type: 'body', property: 'isMultiResponse' } },
266
+ },
267
+ {
268
+ displayName: 'Is Mixed Attachments',
269
+ name: 'isMixedAttachments',
270
+ type: 'boolean',
271
+ default: false,
272
+ routing: { send: { type: 'body', property: 'isMixedAttachments' } },
273
+ },
274
+ {
275
+ displayName: 'Is Audio Message',
276
+ name: 'isAudioMessage',
277
+ type: 'boolean',
278
+ default: false,
279
+ routing: { send: { type: 'body', property: 'isAudioMessage' } },
280
+ },
281
+ {
282
+ displayName: 'Audio Data',
283
+ name: 'audioData',
284
+ type: 'string',
285
+ default: '',
286
+ routing: { send: { type: 'body', property: 'audioData' } },
287
+ },
288
+ {
289
+ displayName: 'Audio File Name',
290
+ name: 'audioFileName',
291
+ type: 'string',
292
+ default: '',
293
+ routing: { send: { type: 'body', property: 'audioFileName' } },
294
+ },
295
+ {
296
+ displayName: 'Audio MIME Type',
297
+ name: 'audioMimeType',
298
+ type: 'string',
299
+ default: '',
300
+ routing: { send: { type: 'body', property: 'audioMimeType' } },
301
+ },
302
+ ],
303
+ },
304
+ // --- createMessage fields ---
305
+ {
306
+ displayName: 'Chat ID',
307
+ name: 'chatId',
308
+ type: 'number',
309
+ required: true,
310
+ default: 0,
311
+ displayOptions: {
312
+ show: {
313
+ resource: ['message'],
314
+ operation: ['createMessage'],
315
+ },
316
+ },
317
+ routing: {
318
+ send: {
319
+ type: 'body',
320
+ property: 'chatId',
321
+ },
322
+ },
323
+ description: 'The chat ID',
324
+ },
325
+ {
326
+ displayName: 'Sender',
327
+ name: 'sender',
328
+ type: 'options',
329
+ required: true,
330
+ default: 'user',
331
+ options: [
332
+ { name: 'User', value: 'user' },
333
+ { name: 'Assistant', value: 'assistant' },
334
+ ],
335
+ displayOptions: {
336
+ show: {
337
+ resource: ['message'],
338
+ operation: ['createMessage'],
339
+ },
340
+ },
341
+ routing: {
342
+ send: {
343
+ type: 'body',
344
+ property: 'sender',
345
+ },
346
+ },
347
+ description: 'Who sent the message',
348
+ },
349
+ {
350
+ displayName: 'Text',
351
+ name: 'text',
352
+ type: 'string',
353
+ typeOptions: { rows: 4 },
354
+ required: true,
355
+ default: '',
356
+ displayOptions: {
357
+ show: {
358
+ resource: ['message'],
359
+ operation: ['createMessage'],
360
+ },
361
+ },
362
+ routing: {
363
+ send: {
364
+ type: 'body',
365
+ property: 'text',
366
+ },
367
+ },
368
+ description: 'The message text',
369
+ },
370
+ // --- bulkCreateMessages fields ---
371
+ {
372
+ displayName: 'Messages JSON',
373
+ name: 'messagesJson',
374
+ type: 'json',
375
+ required: true,
376
+ default: '[]',
377
+ displayOptions: {
378
+ show: {
379
+ resource: ['message'],
380
+ operation: ['bulkCreateMessages'],
381
+ },
382
+ },
383
+ description: 'JSON array of message objects with chatId, sender, text fields',
384
+ routing: {
385
+ send: {
386
+ type: 'body',
387
+ property: '__toRoot',
388
+ },
389
+ },
390
+ },
391
+ // --- editMessage fields ---
392
+ {
393
+ displayName: 'User ID',
394
+ name: 'userId',
395
+ type: 'string',
396
+ required: true,
397
+ default: '',
398
+ displayOptions: {
399
+ show: {
400
+ resource: ['message'],
401
+ operation: ['editMessage'],
402
+ },
403
+ },
404
+ routing: {
405
+ send: {
406
+ type: 'body',
407
+ property: 'userId',
408
+ },
409
+ },
410
+ description: 'The user ID (for ownership validation)',
411
+ },
412
+ {
413
+ displayName: 'Text',
414
+ name: 'text',
415
+ type: 'string',
416
+ typeOptions: { rows: 4 },
417
+ required: true,
418
+ default: '',
419
+ displayOptions: {
420
+ show: {
421
+ resource: ['message'],
422
+ operation: ['editMessage'],
423
+ },
424
+ },
425
+ routing: {
426
+ send: {
427
+ type: 'body',
428
+ property: 'text',
429
+ },
430
+ },
431
+ description: 'The new message text',
432
+ },
433
+ // --- buttonCallback fields ---
434
+ {
435
+ displayName: 'User ID',
436
+ name: 'userId',
437
+ type: 'string',
438
+ required: true,
439
+ default: '',
440
+ displayOptions: {
441
+ show: {
442
+ resource: ['message'],
443
+ operation: ['buttonCallback'],
444
+ },
445
+ },
446
+ routing: {
447
+ send: {
448
+ type: 'body',
449
+ property: 'userId',
450
+ },
451
+ },
452
+ description: 'The user ID',
453
+ },
454
+ {
455
+ displayName: 'Option ID',
456
+ name: 'optionId',
457
+ type: 'number',
458
+ required: true,
459
+ default: 0,
460
+ displayOptions: {
461
+ show: {
462
+ resource: ['message'],
463
+ operation: ['buttonCallback'],
464
+ },
465
+ },
466
+ routing: {
467
+ send: {
468
+ type: 'body',
469
+ property: 'optionId',
470
+ },
471
+ },
472
+ description: 'The message option ID to trigger',
473
+ },
474
+ // =====================================================================
475
+ // sendWebhookMessage fields
476
+ // POST /webhook/message — saves to DB + pushes via WebSocket
477
+ // =====================================================================
478
+ {
479
+ displayName: 'User ID',
480
+ name: 'userId',
481
+ type: 'string',
482
+ required: true,
483
+ default: '',
484
+ displayOptions: {
485
+ show: {
486
+ resource: ['message'],
487
+ operation: ['sendWebhookMessage'],
488
+ },
489
+ },
490
+ routing: {
491
+ send: {
492
+ type: 'body',
493
+ property: 'user_id',
494
+ },
495
+ },
496
+ description: 'The user ID (used for WebSocket room targeting)',
497
+ },
498
+ {
499
+ displayName: 'Chat ID',
500
+ name: 'chatId',
501
+ type: 'number',
502
+ required: true,
503
+ default: 0,
504
+ displayOptions: {
505
+ show: {
506
+ resource: ['message'],
507
+ operation: ['sendWebhookMessage'],
508
+ },
509
+ },
510
+ routing: {
511
+ send: {
512
+ type: 'body',
513
+ property: 'chat_id',
514
+ },
515
+ },
516
+ description: 'The chat ID to send the message to',
517
+ },
518
+ {
519
+ displayName: 'Assistant ID',
520
+ name: 'assistantId',
521
+ type: 'number',
522
+ required: true,
523
+ default: 0,
524
+ displayOptions: {
525
+ show: {
526
+ resource: ['message'],
527
+ operation: ['sendWebhookMessage'],
528
+ },
529
+ },
530
+ routing: {
531
+ send: {
532
+ type: 'body',
533
+ property: 'assistant.id',
534
+ },
535
+ },
536
+ description: 'The assistant ID sending this message',
537
+ },
538
+ {
539
+ displayName: 'Text',
540
+ name: 'text',
541
+ type: 'string',
542
+ typeOptions: { rows: 4 },
543
+ required: true,
544
+ default: '',
545
+ displayOptions: {
546
+ show: {
547
+ resource: ['message'],
548
+ operation: ['sendWebhookMessage'],
549
+ },
550
+ },
551
+ routing: {
552
+ send: {
553
+ type: 'body',
554
+ property: 'text',
555
+ },
556
+ },
557
+ description: 'The message text',
558
+ },
559
+ {
560
+ // Hidden field: also send text inside the nested message object
561
+ displayName: 'Message Text (Auto)',
562
+ name: 'messageText',
563
+ type: 'hidden',
564
+ default: '={{$parameter.text}}',
565
+ displayOptions: {
566
+ show: {
567
+ resource: ['message'],
568
+ operation: ['sendWebhookMessage'],
569
+ },
570
+ },
571
+ routing: {
572
+ send: {
573
+ type: 'body',
574
+ property: 'message.text',
575
+ },
576
+ },
577
+ },
578
+ {
579
+ // Hidden field: auto-send current timestamp so sentDate is never Invalid Date
580
+ displayName: 'Timestamp (Auto)',
581
+ name: 'timestampAuto',
582
+ type: 'hidden',
583
+ default: '={{$now.toISO()}}',
584
+ displayOptions: {
585
+ show: {
586
+ resource: ['message'],
587
+ operation: ['sendWebhookMessage'],
588
+ },
589
+ },
590
+ routing: {
591
+ send: {
592
+ type: 'body',
593
+ property: 'timestamp',
594
+ },
595
+ },
596
+ },
597
+ {
598
+ displayName: 'Additional Fields',
599
+ name: 'additionalFields',
600
+ type: 'collection',
601
+ placeholder: 'Add Field',
602
+ default: {},
603
+ displayOptions: {
604
+ show: {
605
+ resource: ['message'],
606
+ operation: ['sendWebhookMessage'],
607
+ },
608
+ },
609
+ options: [
610
+ {
611
+ displayName: 'Assistant Name',
612
+ name: 'assistantName',
613
+ type: 'string',
614
+ default: 'Assistant',
615
+ description: 'Name of the assistant (sent in the webhook payload)',
616
+ routing: { send: { type: 'body', property: 'assistant.name' } },
617
+ },
618
+ {
619
+ displayName: 'Chat Title',
620
+ name: 'chatTitle',
621
+ type: 'string',
622
+ default: 'Chat',
623
+ description: 'Title of the chat (sent in the webhook payload)',
624
+ routing: { send: { type: 'body', property: 'chat.title' } },
625
+ },
626
+ {
627
+ displayName: 'Chat ID in Chat Object',
628
+ name: 'chatObjectId',
629
+ type: 'string',
630
+ default: '',
631
+ description: 'Chat ID for the nested chat object (defaults to the main Chat ID if empty)',
632
+ routing: { send: { type: 'body', property: 'chat.id' } },
633
+ },
634
+ {
635
+ displayName: 'Event Type',
636
+ name: 'eventType',
637
+ type: 'string',
638
+ default: 'message',
639
+ description: 'The event_type field value',
640
+ routing: { send: { type: 'body', property: 'event_type' } },
641
+ },
642
+ {
643
+ displayName: 'Timestamp',
644
+ name: 'timestamp',
645
+ type: 'string',
646
+ default: '',
647
+ description: 'ISO 8601 timestamp (defaults to current time if empty)',
648
+ routing: { send: { type: 'body', property: 'timestamp' } },
649
+ },
650
+ {
651
+ displayName: 'Sender',
652
+ name: 'sender',
653
+ type: 'options',
654
+ default: 'assistant',
655
+ options: [
656
+ { name: 'User', value: 'user' },
657
+ { name: 'Assistant', value: 'assistant' },
658
+ ],
659
+ description: 'Who sent the message',
660
+ routing: { send: { type: 'body', property: 'sender' } },
661
+ },
662
+ ],
663
+ },
664
+ // =====================================================================
665
+ // editWebhookMessage fields
666
+ // POST /webhook/edited_message — updates DB + pushes via WebSocket
667
+ // =====================================================================
668
+ {
669
+ displayName: 'User ID',
670
+ name: 'userId',
671
+ type: 'string',
672
+ required: true,
673
+ default: '',
674
+ displayOptions: {
675
+ show: {
676
+ resource: ['message'],
677
+ operation: ['editWebhookMessage'],
678
+ },
679
+ },
680
+ routing: {
681
+ send: {
682
+ type: 'body',
683
+ property: 'user_id',
684
+ },
685
+ },
686
+ description: 'The user ID (used for WebSocket room targeting)',
687
+ },
688
+ {
689
+ displayName: 'Chat ID',
690
+ name: 'chatId',
691
+ type: 'number',
692
+ required: true,
693
+ default: 0,
694
+ displayOptions: {
695
+ show: {
696
+ resource: ['message'],
697
+ operation: ['editWebhookMessage'],
698
+ },
699
+ },
700
+ routing: {
701
+ send: {
702
+ type: 'body',
703
+ property: 'chat_id',
704
+ },
705
+ },
706
+ description: 'The chat ID containing the message',
707
+ },
708
+ {
709
+ displayName: 'Message ID',
710
+ name: 'messageId',
711
+ type: 'number',
712
+ required: true,
713
+ default: 0,
714
+ displayOptions: {
715
+ show: {
716
+ resource: ['message'],
717
+ operation: ['editWebhookMessage'],
718
+ },
719
+ },
720
+ routing: {
721
+ send: {
722
+ type: 'body',
723
+ property: 'message_id',
724
+ },
725
+ },
726
+ description: 'The ID of the message to edit',
727
+ },
728
+ {
729
+ displayName: 'Assistant ID',
730
+ name: 'assistantId',
731
+ type: 'number',
732
+ required: true,
733
+ default: 0,
734
+ displayOptions: {
735
+ show: {
736
+ resource: ['message'],
737
+ operation: ['editWebhookMessage'],
738
+ },
739
+ },
740
+ routing: {
741
+ send: {
742
+ type: 'body',
743
+ property: 'assistant.id',
744
+ },
745
+ },
746
+ description: 'The assistant ID',
747
+ },
748
+ {
749
+ displayName: 'Text',
750
+ name: 'text',
751
+ type: 'string',
752
+ typeOptions: { rows: 4 },
753
+ required: true,
754
+ default: '',
755
+ displayOptions: {
756
+ show: {
757
+ resource: ['message'],
758
+ operation: ['editWebhookMessage'],
759
+ },
760
+ },
761
+ routing: {
762
+ send: {
763
+ type: 'body',
764
+ property: 'text',
765
+ },
766
+ },
767
+ description: 'The new message text',
768
+ },
769
+ {
770
+ // Hidden field: also send text and id inside the nested message object
771
+ displayName: 'Message Text (Auto)',
772
+ name: 'messageText',
773
+ type: 'hidden',
774
+ default: '={{$parameter.text}}',
775
+ displayOptions: {
776
+ show: {
777
+ resource: ['message'],
778
+ operation: ['editWebhookMessage'],
779
+ },
780
+ },
781
+ routing: {
782
+ send: {
783
+ type: 'body',
784
+ property: 'message.text',
785
+ },
786
+ },
787
+ },
788
+ {
789
+ // Hidden field: copy messageId into the nested message object
790
+ displayName: 'Message ID (Auto)',
791
+ name: 'messageIdNested',
792
+ type: 'hidden',
793
+ default: '={{$parameter.messageId}}',
794
+ displayOptions: {
795
+ show: {
796
+ resource: ['message'],
797
+ operation: ['editWebhookMessage'],
798
+ },
799
+ },
800
+ routing: {
801
+ send: {
802
+ type: 'body',
803
+ property: 'message.id',
804
+ },
805
+ },
806
+ },
807
+ {
808
+ // Hidden field: auto-send current timestamp so sentDate is never Invalid Date
809
+ displayName: 'Timestamp (Auto)',
810
+ name: 'timestampAuto',
811
+ type: 'hidden',
812
+ default: '={{$now.toISO()}}',
813
+ displayOptions: {
814
+ show: {
815
+ resource: ['message'],
816
+ operation: ['editWebhookMessage'],
817
+ },
818
+ },
819
+ routing: {
820
+ send: {
821
+ type: 'body',
822
+ property: 'timestamp',
823
+ },
824
+ },
825
+ },
826
+ {
827
+ displayName: 'Additional Fields',
828
+ name: 'additionalFields',
829
+ type: 'collection',
830
+ placeholder: 'Add Field',
831
+ default: {},
832
+ displayOptions: {
833
+ show: {
834
+ resource: ['message'],
835
+ operation: ['editWebhookMessage'],
836
+ },
837
+ },
838
+ options: [
839
+ {
840
+ displayName: 'Assistant Name',
841
+ name: 'assistantName',
842
+ type: 'string',
843
+ default: 'Assistant',
844
+ description: 'Name of the assistant (sent in the webhook payload)',
845
+ routing: { send: { type: 'body', property: 'assistant.name' } },
846
+ },
847
+ {
848
+ displayName: 'Chat Title',
849
+ name: 'chatTitle',
850
+ type: 'string',
851
+ default: 'Chat',
852
+ description: 'Title of the chat (sent in the webhook payload)',
853
+ routing: { send: { type: 'body', property: 'chat.title' } },
854
+ },
855
+ {
856
+ displayName: 'Chat ID in Chat Object',
857
+ name: 'chatObjectId',
858
+ type: 'string',
859
+ default: '',
860
+ description: 'Chat ID for the nested chat object (defaults to the main Chat ID if empty)',
861
+ routing: { send: { type: 'body', property: 'chat.id' } },
862
+ },
863
+ {
864
+ displayName: 'Event Type',
865
+ name: 'eventType',
866
+ type: 'string',
867
+ default: 'edited_message',
868
+ description: 'The event_type field value',
869
+ routing: { send: { type: 'body', property: 'event_type' } },
870
+ },
871
+ {
872
+ displayName: 'Timestamp',
873
+ name: 'timestamp',
874
+ type: 'string',
875
+ default: '',
876
+ description: 'ISO 8601 timestamp (defaults to current time if empty)',
877
+ routing: { send: { type: 'body', property: 'timestamp' } },
878
+ },
879
+ ],
880
+ },
881
+ ];