n8n-nodes-steyi-ss 1.0.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 +192 -0
- package/dist/credentials/SteyiSmartsheetCreds.credentials.d.ts +9 -0
- package/dist/credentials/SteyiSmartsheetCreds.credentials.js +38 -0
- package/dist/nodes/SteyiSmartsheet/SteyiGenericFunction.d.ts +3 -0
- package/dist/nodes/SteyiSmartsheet/SteyiGenericFunction.js +58 -0
- package/dist/nodes/SteyiSmartsheet/SteyiSmartsheet.node.d.ts +19 -0
- package/dist/nodes/SteyiSmartsheet/SteyiSmartsheet.node.js +1988 -0
- package/dist/nodes/SteyiSmartsheet/SteyiSmartsheetApi.d.ts +24 -0
- package/dist/nodes/SteyiSmartsheet/SteyiSmartsheetApi.js +174 -0
- package/dist/nodes/SteyiSmartsheet/SteyiSmartsheetTrigger.node.d.ts +17 -0
- package/dist/nodes/SteyiSmartsheet/SteyiSmartsheetTrigger.node.js +173 -0
- package/dist/nodes/SteyiSmartsheet/executors/Admin.d.ts +2 -0
- package/dist/nodes/SteyiSmartsheet/executors/Admin.js +180 -0
- package/dist/nodes/SteyiSmartsheet/executors/Columns.d.ts +2 -0
- package/dist/nodes/SteyiSmartsheet/executors/Columns.js +53 -0
- package/dist/nodes/SteyiSmartsheet/executors/Reports.d.ts +2 -0
- package/dist/nodes/SteyiSmartsheet/executors/Reports.js +27 -0
- package/dist/nodes/SteyiSmartsheet/executors/Rows.d.ts +2 -0
- package/dist/nodes/SteyiSmartsheet/executors/Rows.js +845 -0
- package/dist/nodes/SteyiSmartsheet/executors/Sheets.d.ts +2 -0
- package/dist/nodes/SteyiSmartsheet/executors/Sheets.js +85 -0
- package/dist/nodes/SteyiSmartsheet/executors/Webhooks.d.ts +2 -0
- package/dist/nodes/SteyiSmartsheet/executors/Webhooks.js +67 -0
- package/dist/nodes/SteyiSmartsheet/steyi-smartsheet.svg +6 -0
- package/package.json +56 -0
|
@@ -0,0 +1,1988 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SteyiSmartsheet = void 0;
|
|
4
|
+
const Sheets_1 = require("./executors/Sheets");
|
|
5
|
+
const Rows_1 = require("./executors/Rows");
|
|
6
|
+
const Webhooks_1 = require("./executors/Webhooks");
|
|
7
|
+
const Columns_1 = require("./executors/Columns");
|
|
8
|
+
const Reports_1 = require("./executors/Reports");
|
|
9
|
+
const Admin_1 = require("./executors/Admin");
|
|
10
|
+
const SteyiSmartsheetApi_1 = require("./SteyiSmartsheetApi");
|
|
11
|
+
const SteyiGenericFunction_1 = require("./SteyiGenericFunction");
|
|
12
|
+
class SteyiSmartsheet {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.description = {
|
|
15
|
+
displayName: 'Steyi Smartsheet',
|
|
16
|
+
name: 'steyiSmartsheet',
|
|
17
|
+
icon: 'file:steyi-smartsheet.svg',
|
|
18
|
+
group: ['transform'],
|
|
19
|
+
version: 1,
|
|
20
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
21
|
+
description: 'Interact with Smartsheet API (Steyi)',
|
|
22
|
+
defaults: {
|
|
23
|
+
name: 'Steyi Smartsheet',
|
|
24
|
+
},
|
|
25
|
+
inputs: ['main'],
|
|
26
|
+
outputs: ['main'],
|
|
27
|
+
credentials: [
|
|
28
|
+
{
|
|
29
|
+
name: 'steyiSmartsheetCreds',
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
properties: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Resource',
|
|
36
|
+
name: 'resource',
|
|
37
|
+
type: 'options',
|
|
38
|
+
noDataExpression: true,
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Sheet',
|
|
42
|
+
value: 'sheet',
|
|
43
|
+
description: 'Creates, retrieves, updates, or deletes the specified sheet',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Row',
|
|
47
|
+
value: 'row',
|
|
48
|
+
description: 'Creates, retrieves, updates, or deletes the specified row',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Column',
|
|
52
|
+
value: 'column',
|
|
53
|
+
description: 'Retrieves columns from a sheet',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Webhook',
|
|
57
|
+
value: 'webhook',
|
|
58
|
+
description: 'Manages webhooks for Smartsheet',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Report',
|
|
62
|
+
value: 'report',
|
|
63
|
+
description: 'Retrieves reports from Smartsheet',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Admin',
|
|
67
|
+
value: 'admin',
|
|
68
|
+
description: 'Manage users, groups, and group members',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
default: 'sheet',
|
|
72
|
+
required: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Sheet Name or ID',
|
|
76
|
+
name: 'sheetId',
|
|
77
|
+
type: 'options',
|
|
78
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
79
|
+
typeOptions: {
|
|
80
|
+
loadOptionsMethod: 'getSheets',
|
|
81
|
+
},
|
|
82
|
+
displayOptions: {
|
|
83
|
+
show: {
|
|
84
|
+
resource: ['sheet', 'row', 'column'],
|
|
85
|
+
operation: ['getSheet', 'updateSheet', 'deleteSheet', 'addRow', 'updateRow', 'deleteRow', 'getRow', 'getRowMapped', 'getColumns', 'updateColumn'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
default: '',
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Operation',
|
|
93
|
+
name: 'operation',
|
|
94
|
+
type: 'options',
|
|
95
|
+
noDataExpression: true,
|
|
96
|
+
displayOptions: {
|
|
97
|
+
show: {
|
|
98
|
+
resource: ['sheet'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
options: [
|
|
102
|
+
{
|
|
103
|
+
name: 'Create',
|
|
104
|
+
value: 'createSheet',
|
|
105
|
+
description: 'Create a new sheet',
|
|
106
|
+
action: 'Create a sheet',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'Delete',
|
|
110
|
+
value: 'deleteSheet',
|
|
111
|
+
description: 'Delete a sheet',
|
|
112
|
+
action: 'Delete a sheet',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'Get',
|
|
116
|
+
value: 'getSheet',
|
|
117
|
+
description: 'Get details of a specific sheet',
|
|
118
|
+
action: 'Get a sheet',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'List',
|
|
122
|
+
value: 'listSheets',
|
|
123
|
+
description: 'Get a list of all sheets',
|
|
124
|
+
action: 'List all sheets',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'Update',
|
|
128
|
+
value: 'updateSheet',
|
|
129
|
+
description: 'Update a sheet name',
|
|
130
|
+
action: 'Update a sheet',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
default: 'listSheets',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
displayName: 'Operation',
|
|
137
|
+
name: 'operation',
|
|
138
|
+
type: 'options',
|
|
139
|
+
noDataExpression: true,
|
|
140
|
+
displayOptions: {
|
|
141
|
+
show: {
|
|
142
|
+
resource: ['row'],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
options: [
|
|
146
|
+
{
|
|
147
|
+
name: 'Add',
|
|
148
|
+
value: 'addRow',
|
|
149
|
+
description: 'Add a new row to a sheet',
|
|
150
|
+
action: 'Add a row',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'Delete',
|
|
154
|
+
value: 'deleteRow',
|
|
155
|
+
description: 'Delete a row from a sheet',
|
|
156
|
+
action: 'Delete a row',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'Get',
|
|
160
|
+
value: 'getRow',
|
|
161
|
+
description: 'Get details of a specific row',
|
|
162
|
+
action: 'Get a row',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'Get (Mapped)',
|
|
166
|
+
value: 'getRowMapped',
|
|
167
|
+
description: 'Get a row with cells mapped by column title',
|
|
168
|
+
action: 'Get a row mapped by column name',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'Update',
|
|
172
|
+
value: 'updateRow',
|
|
173
|
+
description: 'Update an existing row',
|
|
174
|
+
action: 'Update a row',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
default: 'addRow',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
displayName: 'Operation',
|
|
181
|
+
name: 'operation',
|
|
182
|
+
type: 'options',
|
|
183
|
+
noDataExpression: true,
|
|
184
|
+
displayOptions: {
|
|
185
|
+
show: {
|
|
186
|
+
resource: ['column'],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
options: [
|
|
190
|
+
{
|
|
191
|
+
name: 'Get',
|
|
192
|
+
value: 'getColumns',
|
|
193
|
+
description: 'Get columns of a sheet',
|
|
194
|
+
action: 'Get columns',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: 'Update',
|
|
198
|
+
value: 'updateColumn',
|
|
199
|
+
description: 'Update a column',
|
|
200
|
+
action: 'Update a column',
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
default: 'getColumns',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Column Name or ID',
|
|
207
|
+
name: 'columnId',
|
|
208
|
+
type: 'options',
|
|
209
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
210
|
+
typeOptions: {
|
|
211
|
+
loadOptionsMethod: 'getColumns',
|
|
212
|
+
},
|
|
213
|
+
displayOptions: {
|
|
214
|
+
show: {
|
|
215
|
+
resource: ['column'],
|
|
216
|
+
operation: ['updateColumn'],
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
default: '',
|
|
220
|
+
required: true,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
displayName: 'Title',
|
|
224
|
+
name: 'title',
|
|
225
|
+
type: 'string',
|
|
226
|
+
displayOptions: {
|
|
227
|
+
show: {
|
|
228
|
+
resource: ['column'],
|
|
229
|
+
operation: ['updateColumn'],
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
default: '',
|
|
233
|
+
description: 'The title of the column',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
displayName: 'Index',
|
|
237
|
+
name: 'index',
|
|
238
|
+
type: 'number',
|
|
239
|
+
displayOptions: {
|
|
240
|
+
show: {
|
|
241
|
+
resource: ['column'],
|
|
242
|
+
operation: ['updateColumn'],
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
default: null,
|
|
246
|
+
description: 'The position of the column (0-based index)',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
displayName: 'Column Type',
|
|
250
|
+
name: 'columnType',
|
|
251
|
+
type: 'options',
|
|
252
|
+
displayOptions: {
|
|
253
|
+
show: {
|
|
254
|
+
resource: ['column'],
|
|
255
|
+
operation: ['updateColumn'],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
options: [
|
|
259
|
+
{
|
|
260
|
+
name: 'Checkbox',
|
|
261
|
+
value: 'CHECKBOX',
|
|
262
|
+
description: 'Checkbox, star, and flag types',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'Contact List',
|
|
266
|
+
value: 'CONTACT_LIST',
|
|
267
|
+
description: 'List containing contacts or roles for a project',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'Multi Contact List',
|
|
271
|
+
value: 'MULTI_CONTACT_LIST',
|
|
272
|
+
description: 'List where single cells can contain more than one contact',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'Date',
|
|
276
|
+
value: 'DATE',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: 'Date/Time (Abstract)',
|
|
280
|
+
value: 'ABSTRACT_DATETIME',
|
|
281
|
+
description: 'Represents a project sheet\'s start and end dates. Only for dependency-enabled project sheets',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'Date/Time',
|
|
285
|
+
value: 'DATETIME',
|
|
286
|
+
description: 'Used only by system-generated columns (Created Date, Modified Date)',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: 'Dropdown List',
|
|
290
|
+
value: 'PICKLIST',
|
|
291
|
+
description: 'Custom, RYG, Harvey ball, priority types, etc.',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: 'Multi Dropdown List',
|
|
295
|
+
value: 'MULTI_PICKLIST',
|
|
296
|
+
description: 'List where single cells can contain more than one dropdown item',
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: 'Duration',
|
|
300
|
+
value: 'DURATION',
|
|
301
|
+
description: 'Only for dependency-enabled project sheets',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: 'Predecessor',
|
|
305
|
+
value: 'PREDECESSOR',
|
|
306
|
+
description: 'Defines what must happen first in a project flow. Only for dependency-enabled project sheets',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: 'Text/Number',
|
|
310
|
+
value: 'TEXT_NUMBER',
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
default: 'TEXT_NUMBER',
|
|
314
|
+
required: true,
|
|
315
|
+
description: 'The type of the column',
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
displayName: 'Options',
|
|
319
|
+
name: 'options',
|
|
320
|
+
type: 'fixedCollection',
|
|
321
|
+
typeOptions: {
|
|
322
|
+
multipleValues: true,
|
|
323
|
+
},
|
|
324
|
+
displayOptions: {
|
|
325
|
+
show: {
|
|
326
|
+
resource: ['column'],
|
|
327
|
+
operation: ['updateColumn'],
|
|
328
|
+
columnType: ['PICKLIST', 'MULTI_PICKLIST'],
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
default: {},
|
|
332
|
+
placeholder: 'Add Option',
|
|
333
|
+
description: 'Options for dropdown list columns (PICKLIST and MULTI_PICKLIST)',
|
|
334
|
+
options: [
|
|
335
|
+
{
|
|
336
|
+
displayName: 'Option',
|
|
337
|
+
name: 'option',
|
|
338
|
+
values: [
|
|
339
|
+
{
|
|
340
|
+
displayName: 'Option Value',
|
|
341
|
+
name: 'option',
|
|
342
|
+
type: 'string',
|
|
343
|
+
default: '',
|
|
344
|
+
description: 'The option value',
|
|
345
|
+
required: true,
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
displayName: 'Operation',
|
|
353
|
+
name: 'operation',
|
|
354
|
+
type: 'options',
|
|
355
|
+
noDataExpression: true,
|
|
356
|
+
displayOptions: {
|
|
357
|
+
show: {
|
|
358
|
+
resource: ['webhook'],
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
options: [
|
|
362
|
+
{
|
|
363
|
+
name: 'Create',
|
|
364
|
+
value: 'createWebhook',
|
|
365
|
+
description: 'Create a new webhook',
|
|
366
|
+
action: 'Create a webhook',
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
name: 'Delete',
|
|
370
|
+
value: 'deleteWebhook',
|
|
371
|
+
description: 'Delete a webhook',
|
|
372
|
+
action: 'Delete a webhook',
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: 'List',
|
|
376
|
+
value: 'listWebhooks',
|
|
377
|
+
description: 'List all webhooks',
|
|
378
|
+
action: 'List all webhooks',
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: 'Update',
|
|
382
|
+
value: 'updateWebhook',
|
|
383
|
+
description: 'Update a webhook',
|
|
384
|
+
action: 'Update a webhook',
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
default: 'listWebhooks',
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
displayName: 'Mapping Type',
|
|
391
|
+
name: 'mappingType',
|
|
392
|
+
type: 'options',
|
|
393
|
+
displayOptions: {
|
|
394
|
+
show: {
|
|
395
|
+
resource: ['row'],
|
|
396
|
+
operation: ['getRowMapped'],
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
options: [
|
|
400
|
+
{
|
|
401
|
+
name: 'By Column Title',
|
|
402
|
+
value: 'columnTitle',
|
|
403
|
+
description: 'Map cells by column title (default)',
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: 'By Column ID',
|
|
407
|
+
value: 'columnId',
|
|
408
|
+
description: 'Map cells by column ID',
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
default: 'columnTitle',
|
|
412
|
+
description: 'How to map the row cells in the response',
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
displayName: 'Row ID',
|
|
416
|
+
name: 'rowId',
|
|
417
|
+
type: 'string',
|
|
418
|
+
displayOptions: {
|
|
419
|
+
show: {
|
|
420
|
+
resource: ['row'],
|
|
421
|
+
operation: ['getRow', 'getRowMapped', 'updateRow', 'deleteRow'],
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
default: '',
|
|
425
|
+
required: true,
|
|
426
|
+
description: 'The ID of the row to get, update, or delete',
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
displayName: 'Include',
|
|
430
|
+
name: 'include',
|
|
431
|
+
type: 'multiOptions',
|
|
432
|
+
displayOptions: {
|
|
433
|
+
show: {
|
|
434
|
+
resource: ['row'],
|
|
435
|
+
operation: ['getRow', 'getRowMapped'],
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
options: [
|
|
439
|
+
{
|
|
440
|
+
name: 'Attachments',
|
|
441
|
+
value: 'attachments',
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
name: 'Cell Links',
|
|
445
|
+
value: 'cellLinks',
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: 'Discussions',
|
|
449
|
+
value: 'discussions',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
name: 'Format',
|
|
453
|
+
value: 'format',
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: 'Object Value',
|
|
457
|
+
value: 'objectValue',
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
name: 'Row Attachments',
|
|
461
|
+
value: 'rowAttachments',
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: 'Row Permalink',
|
|
465
|
+
value: 'rowPermalink',
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: 'Source',
|
|
469
|
+
value: 'source',
|
|
470
|
+
},
|
|
471
|
+
],
|
|
472
|
+
default: [],
|
|
473
|
+
description: 'Additional fields to include in the response',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
displayName: 'Exclude',
|
|
477
|
+
name: 'exclude',
|
|
478
|
+
type: 'multiOptions',
|
|
479
|
+
displayOptions: {
|
|
480
|
+
show: {
|
|
481
|
+
resource: ['row'],
|
|
482
|
+
operation: ['getRow', 'getRowMapped'],
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
options: [
|
|
486
|
+
{
|
|
487
|
+
name: 'Attachments',
|
|
488
|
+
value: 'attachments',
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: 'Cell Links',
|
|
492
|
+
value: 'cellLinks',
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: 'Discussions',
|
|
496
|
+
value: 'discussions',
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: 'Format',
|
|
500
|
+
value: 'format',
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: 'Object Value',
|
|
504
|
+
value: 'objectValue',
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
name: 'Row Attachments',
|
|
508
|
+
value: 'rowAttachments',
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
name: 'Row Permalink',
|
|
512
|
+
value: 'rowPermalink',
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
name: 'Source',
|
|
516
|
+
value: 'source',
|
|
517
|
+
},
|
|
518
|
+
],
|
|
519
|
+
default: [],
|
|
520
|
+
description: 'Fields to exclude from the response',
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
displayName: 'Cells',
|
|
524
|
+
name: 'cells',
|
|
525
|
+
type: 'fixedCollection',
|
|
526
|
+
typeOptions: {
|
|
527
|
+
multipleValues: true,
|
|
528
|
+
},
|
|
529
|
+
displayOptions: {
|
|
530
|
+
show: {
|
|
531
|
+
resource: ['row'],
|
|
532
|
+
operation: ['addRow', 'updateRow'],
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
default: {},
|
|
536
|
+
placeholder: 'Add Cell',
|
|
537
|
+
description: 'The cells to add or update',
|
|
538
|
+
options: [
|
|
539
|
+
{
|
|
540
|
+
displayName: 'Cell',
|
|
541
|
+
name: 'cell',
|
|
542
|
+
values: [
|
|
543
|
+
{
|
|
544
|
+
displayName: 'Column Input Method',
|
|
545
|
+
name: 'columnInputMethod',
|
|
546
|
+
type: 'options',
|
|
547
|
+
options: [
|
|
548
|
+
{
|
|
549
|
+
name: 'Select from List',
|
|
550
|
+
value: 'list',
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: 'Enter Column ID',
|
|
554
|
+
value: 'id',
|
|
555
|
+
},
|
|
556
|
+
],
|
|
557
|
+
default: 'list',
|
|
558
|
+
description: 'Choose how to specify the column',
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
displayName: 'Column',
|
|
562
|
+
name: 'columnId',
|
|
563
|
+
type: 'options',
|
|
564
|
+
typeOptions: {
|
|
565
|
+
loadOptionsMethod: 'getColumns',
|
|
566
|
+
loadOptionsDependsOn: ['sheetId'],
|
|
567
|
+
},
|
|
568
|
+
displayOptions: {
|
|
569
|
+
show: {
|
|
570
|
+
columnInputMethod: ['list'],
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
default: '',
|
|
574
|
+
description: 'Select a column',
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
displayName: 'Column ID',
|
|
578
|
+
name: 'columnIdManual',
|
|
579
|
+
type: 'string',
|
|
580
|
+
displayOptions: {
|
|
581
|
+
show: {
|
|
582
|
+
columnInputMethod: ['id'],
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
default: '',
|
|
586
|
+
description: 'Enter the Column ID manually',
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
displayName: 'Value',
|
|
590
|
+
name: 'value',
|
|
591
|
+
type: 'string',
|
|
592
|
+
default: '',
|
|
593
|
+
description: 'The value to set',
|
|
594
|
+
},
|
|
595
|
+
],
|
|
596
|
+
},
|
|
597
|
+
],
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
displayName: 'Special Options',
|
|
601
|
+
name: 'specialOptions',
|
|
602
|
+
type: 'multiOptions',
|
|
603
|
+
displayOptions: {
|
|
604
|
+
show: {
|
|
605
|
+
resource: ['row'],
|
|
606
|
+
operation: ['addRow', 'updateRow'],
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
options: [
|
|
610
|
+
{
|
|
611
|
+
name: 'Location',
|
|
612
|
+
value: 'location',
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
name: 'Discussions',
|
|
616
|
+
value: 'discussions',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
name: 'Attachments',
|
|
620
|
+
value: 'attachments',
|
|
621
|
+
},
|
|
622
|
+
],
|
|
623
|
+
default: [],
|
|
624
|
+
description: 'Select which special options to enable',
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
displayName: 'Location',
|
|
628
|
+
name: 'location',
|
|
629
|
+
type: 'options',
|
|
630
|
+
displayOptions: {
|
|
631
|
+
show: {
|
|
632
|
+
resource: ['row'],
|
|
633
|
+
operation: ['addRow', 'updateRow'],
|
|
634
|
+
specialOptions: ['location'],
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
options: [
|
|
638
|
+
{
|
|
639
|
+
name: 'Top',
|
|
640
|
+
value: 'top',
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
name: 'Bottom',
|
|
644
|
+
value: 'bottom',
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
name: 'Use Parent Row',
|
|
648
|
+
value: 'parent',
|
|
649
|
+
},
|
|
650
|
+
],
|
|
651
|
+
default: 'bottom',
|
|
652
|
+
description: 'Where to place the row',
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
displayName: 'Parent Row ID',
|
|
656
|
+
name: 'parentId',
|
|
657
|
+
type: 'string',
|
|
658
|
+
displayOptions: {
|
|
659
|
+
show: {
|
|
660
|
+
resource: ['row'],
|
|
661
|
+
operation: ['addRow', 'updateRow'],
|
|
662
|
+
specialOptions: ['location'],
|
|
663
|
+
location: ['parent'],
|
|
664
|
+
},
|
|
665
|
+
},
|
|
666
|
+
default: '',
|
|
667
|
+
required: true,
|
|
668
|
+
description: 'The ID of the parent row to set as the parent (for hierarchical rows)',
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
displayName: 'Discussions',
|
|
672
|
+
name: 'discussions',
|
|
673
|
+
type: 'fixedCollection',
|
|
674
|
+
typeOptions: {
|
|
675
|
+
multipleValues: true,
|
|
676
|
+
},
|
|
677
|
+
displayOptions: {
|
|
678
|
+
show: {
|
|
679
|
+
resource: ['row'],
|
|
680
|
+
operation: ['addRow', 'updateRow'],
|
|
681
|
+
specialOptions: ['discussions'],
|
|
682
|
+
},
|
|
683
|
+
},
|
|
684
|
+
default: {},
|
|
685
|
+
placeholder: 'Add Discussion',
|
|
686
|
+
description: 'Add a comment to an existing discussion or create a new discussion',
|
|
687
|
+
options: [
|
|
688
|
+
{
|
|
689
|
+
displayName: 'Discussion',
|
|
690
|
+
name: 'discussion',
|
|
691
|
+
values: [
|
|
692
|
+
{
|
|
693
|
+
displayName: 'Action',
|
|
694
|
+
name: 'action',
|
|
695
|
+
type: 'options',
|
|
696
|
+
options: [
|
|
697
|
+
{
|
|
698
|
+
name: 'Add to Existing Discussion',
|
|
699
|
+
value: 'addToExisting',
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
name: 'Create New Discussion',
|
|
703
|
+
value: 'createNew',
|
|
704
|
+
},
|
|
705
|
+
],
|
|
706
|
+
default: 'createNew',
|
|
707
|
+
description: 'Whether to add to an existing discussion or create a new one',
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
displayName: 'Discussion',
|
|
711
|
+
name: 'discussionId',
|
|
712
|
+
type: 'options',
|
|
713
|
+
displayOptions: {
|
|
714
|
+
show: {
|
|
715
|
+
action: ['addToExisting'],
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
typeOptions: {
|
|
719
|
+
loadOptionsMethod: 'getDiscussions',
|
|
720
|
+
loadOptionsDependsOn: ['sheetId', 'rowId'],
|
|
721
|
+
},
|
|
722
|
+
default: '',
|
|
723
|
+
description: 'The existing discussion to add a comment to (for updateRow only)',
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
displayName: 'Discussion ID',
|
|
727
|
+
name: 'discussionIdManual',
|
|
728
|
+
type: 'string',
|
|
729
|
+
displayOptions: {
|
|
730
|
+
show: {
|
|
731
|
+
action: ['addToExisting'],
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
default: '',
|
|
735
|
+
description: 'The ID of the existing discussion to add a comment to (manual entry, use when discussion dropdown is not available)',
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
displayName: 'Comment Text',
|
|
739
|
+
name: 'commentText',
|
|
740
|
+
type: 'string',
|
|
741
|
+
default: '',
|
|
742
|
+
description: 'The comment text to add',
|
|
743
|
+
},
|
|
744
|
+
],
|
|
745
|
+
},
|
|
746
|
+
],
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
displayName: 'Attachments',
|
|
750
|
+
name: 'attachments',
|
|
751
|
+
type: 'fixedCollection',
|
|
752
|
+
typeOptions: {
|
|
753
|
+
multipleValues: true,
|
|
754
|
+
},
|
|
755
|
+
displayOptions: {
|
|
756
|
+
show: {
|
|
757
|
+
resource: ['row'],
|
|
758
|
+
operation: ['addRow', 'updateRow'],
|
|
759
|
+
specialOptions: ['attachments'],
|
|
760
|
+
},
|
|
761
|
+
},
|
|
762
|
+
default: {},
|
|
763
|
+
placeholder: 'Add Attachment',
|
|
764
|
+
description: 'Attachments to add to the row',
|
|
765
|
+
options: [
|
|
766
|
+
{
|
|
767
|
+
displayName: 'Attachment',
|
|
768
|
+
name: 'attachment',
|
|
769
|
+
values: [
|
|
770
|
+
{
|
|
771
|
+
displayName: 'Name',
|
|
772
|
+
name: 'name',
|
|
773
|
+
type: 'string',
|
|
774
|
+
default: '',
|
|
775
|
+
description: 'Name of the attachment',
|
|
776
|
+
required: true,
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
displayName: 'URL or Binary Property',
|
|
780
|
+
name: 'url',
|
|
781
|
+
type: 'string',
|
|
782
|
+
default: '',
|
|
783
|
+
description: 'For LINK type: URL of the attachment. For FILE type: Name of the binary property from the previous node (e.g., "data"). Check the previous node\'s output to see available binary property names.',
|
|
784
|
+
required: true,
|
|
785
|
+
hint: 'For FILE attachments, enter the binary property name (usually "data"). You can check available properties in the previous node\'s output.',
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
displayName: 'Attachment Type',
|
|
789
|
+
name: 'attachmentType',
|
|
790
|
+
type: 'options',
|
|
791
|
+
options: [
|
|
792
|
+
{
|
|
793
|
+
name: 'File',
|
|
794
|
+
value: 'FILE',
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
name: 'Link',
|
|
798
|
+
value: 'LINK',
|
|
799
|
+
},
|
|
800
|
+
],
|
|
801
|
+
default: 'LINK',
|
|
802
|
+
description: 'Type of attachment',
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
displayName: 'Attachment Category',
|
|
806
|
+
name: 'attachmentCategory',
|
|
807
|
+
type: 'options',
|
|
808
|
+
displayOptions: {
|
|
809
|
+
show: {
|
|
810
|
+
attachmentType: ['FILE'],
|
|
811
|
+
},
|
|
812
|
+
},
|
|
813
|
+
options: [
|
|
814
|
+
{
|
|
815
|
+
name: 'Regular Attachment',
|
|
816
|
+
value: 'attachment',
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
name: 'Proof',
|
|
820
|
+
value: 'proof',
|
|
821
|
+
},
|
|
822
|
+
],
|
|
823
|
+
default: 'attachment',
|
|
824
|
+
description: 'Whether this is a regular attachment or a proof (for collaborative review and approval)',
|
|
825
|
+
},
|
|
826
|
+
],
|
|
827
|
+
},
|
|
828
|
+
],
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
displayName: 'Include',
|
|
832
|
+
name: 'include',
|
|
833
|
+
type: 'multiOptions',
|
|
834
|
+
displayOptions: {
|
|
835
|
+
show: {
|
|
836
|
+
resource: ['sheet'],
|
|
837
|
+
operation: ['getSheet'],
|
|
838
|
+
},
|
|
839
|
+
},
|
|
840
|
+
options: [
|
|
841
|
+
{
|
|
842
|
+
name: 'Attachments',
|
|
843
|
+
value: 'attachments',
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: 'Cell Links',
|
|
847
|
+
value: 'cellLinks',
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
name: 'Discussions',
|
|
851
|
+
value: 'discussions',
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
name: 'Format',
|
|
855
|
+
value: 'format',
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
name: 'Object Value',
|
|
859
|
+
value: 'objectValue',
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: 'Row Attachments',
|
|
863
|
+
value: 'rowAttachments',
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: 'Row Permalink',
|
|
867
|
+
value: 'rowPermalink',
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
name: 'Source',
|
|
871
|
+
value: 'source',
|
|
872
|
+
},
|
|
873
|
+
],
|
|
874
|
+
default: [],
|
|
875
|
+
description: 'Additional fields to include in the response',
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
displayName: 'Sheet Name',
|
|
879
|
+
name: 'sheetName',
|
|
880
|
+
type: 'string',
|
|
881
|
+
displayOptions: {
|
|
882
|
+
show: {
|
|
883
|
+
resource: ['sheet'],
|
|
884
|
+
operation: ['createSheet', 'updateSheet'],
|
|
885
|
+
},
|
|
886
|
+
},
|
|
887
|
+
default: '',
|
|
888
|
+
required: true,
|
|
889
|
+
description: 'The name of the sheet',
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
displayName: 'Workspace',
|
|
893
|
+
name: 'workspaceId',
|
|
894
|
+
type: 'options',
|
|
895
|
+
description: 'The workspace to create the sheet in (optional). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
896
|
+
typeOptions: {
|
|
897
|
+
loadOptionsMethod: 'getWorkspaces',
|
|
898
|
+
},
|
|
899
|
+
displayOptions: {
|
|
900
|
+
show: {
|
|
901
|
+
resource: ['sheet'],
|
|
902
|
+
operation: ['createSheet'],
|
|
903
|
+
},
|
|
904
|
+
},
|
|
905
|
+
default: '',
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
displayName: 'Folder',
|
|
909
|
+
name: 'folderID',
|
|
910
|
+
type: 'options',
|
|
911
|
+
description: 'The folder to create the sheet in (optional, only shown if workspace is selected). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
912
|
+
typeOptions: {
|
|
913
|
+
loadOptionsMethod: 'getFolders',
|
|
914
|
+
loadOptionsDependsOn: ['workspaceId'],
|
|
915
|
+
},
|
|
916
|
+
displayOptions: {
|
|
917
|
+
show: {
|
|
918
|
+
resource: ['sheet'],
|
|
919
|
+
operation: ['createSheet'],
|
|
920
|
+
},
|
|
921
|
+
},
|
|
922
|
+
default: '',
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
displayName: 'Columns',
|
|
926
|
+
name: 'columns',
|
|
927
|
+
type: 'fixedCollection',
|
|
928
|
+
typeOptions: {
|
|
929
|
+
multipleValues: true,
|
|
930
|
+
},
|
|
931
|
+
displayOptions: {
|
|
932
|
+
show: {
|
|
933
|
+
resource: ['sheet'],
|
|
934
|
+
operation: ['createSheet'],
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
default: {},
|
|
938
|
+
placeholder: 'Add Column',
|
|
939
|
+
description: 'Columns to create in the sheet',
|
|
940
|
+
options: [
|
|
941
|
+
{
|
|
942
|
+
displayName: 'Column',
|
|
943
|
+
name: 'column',
|
|
944
|
+
values: [
|
|
945
|
+
{
|
|
946
|
+
displayName: 'Title',
|
|
947
|
+
name: 'title',
|
|
948
|
+
type: 'string',
|
|
949
|
+
default: '',
|
|
950
|
+
required: true,
|
|
951
|
+
description: 'Column title',
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
displayName: 'Type',
|
|
955
|
+
name: 'type',
|
|
956
|
+
type: 'options',
|
|
957
|
+
options: [
|
|
958
|
+
{ name: 'Text/Number', value: 'TEXT_NUMBER' },
|
|
959
|
+
{ name: 'Date', value: 'DATE' },
|
|
960
|
+
{ name: 'Contact List', value: 'CONTACT_LIST' },
|
|
961
|
+
{ name: 'Checkbox', value: 'CHECKBOX' },
|
|
962
|
+
{ name: 'Picklist', value: 'PICKLIST' },
|
|
963
|
+
{ name: 'Duration', value: 'DURATION' },
|
|
964
|
+
],
|
|
965
|
+
default: 'TEXT_NUMBER',
|
|
966
|
+
description: 'Column type',
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
displayName: 'Primary',
|
|
970
|
+
name: 'primary',
|
|
971
|
+
type: 'boolean',
|
|
972
|
+
default: false,
|
|
973
|
+
description: 'Whether this is the primary column',
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
displayName: 'Options',
|
|
977
|
+
name: 'options',
|
|
978
|
+
type: 'fixedCollection',
|
|
979
|
+
typeOptions: {
|
|
980
|
+
multipleValues: true,
|
|
981
|
+
},
|
|
982
|
+
displayOptions: {
|
|
983
|
+
show: {
|
|
984
|
+
type: ['PICKLIST'],
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
default: {},
|
|
988
|
+
placeholder: 'Add Option',
|
|
989
|
+
description: 'Options for picklist columns',
|
|
990
|
+
options: [
|
|
991
|
+
{
|
|
992
|
+
displayName: 'Option',
|
|
993
|
+
name: 'option',
|
|
994
|
+
values: [
|
|
995
|
+
{
|
|
996
|
+
displayName: 'Option Value',
|
|
997
|
+
name: 'option',
|
|
998
|
+
type: 'string',
|
|
999
|
+
default: '',
|
|
1000
|
+
required: true,
|
|
1001
|
+
},
|
|
1002
|
+
],
|
|
1003
|
+
},
|
|
1004
|
+
],
|
|
1005
|
+
},
|
|
1006
|
+
],
|
|
1007
|
+
},
|
|
1008
|
+
],
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
displayName: 'Webhook',
|
|
1012
|
+
name: 'webhookId',
|
|
1013
|
+
type: 'options',
|
|
1014
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
1015
|
+
typeOptions: {
|
|
1016
|
+
loadOptionsMethod: 'getWebhooks',
|
|
1017
|
+
},
|
|
1018
|
+
displayOptions: {
|
|
1019
|
+
show: {
|
|
1020
|
+
resource: ['webhook'],
|
|
1021
|
+
operation: ['updateWebhook', 'deleteWebhook'],
|
|
1022
|
+
},
|
|
1023
|
+
},
|
|
1024
|
+
default: '',
|
|
1025
|
+
required: true,
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
displayName: 'Sheet Name or ID',
|
|
1029
|
+
name: 'sheetId',
|
|
1030
|
+
type: 'options',
|
|
1031
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
1032
|
+
typeOptions: {
|
|
1033
|
+
loadOptionsMethod: 'getSheets',
|
|
1034
|
+
},
|
|
1035
|
+
displayOptions: {
|
|
1036
|
+
show: {
|
|
1037
|
+
resource: ['webhook'],
|
|
1038
|
+
operation: ['createWebhook'],
|
|
1039
|
+
},
|
|
1040
|
+
},
|
|
1041
|
+
default: '',
|
|
1042
|
+
required: true,
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
displayName: 'Webhook Name',
|
|
1046
|
+
name: 'webhookName',
|
|
1047
|
+
type: 'string',
|
|
1048
|
+
displayOptions: {
|
|
1049
|
+
show: {
|
|
1050
|
+
resource: ['webhook'],
|
|
1051
|
+
operation: ['createWebhook'],
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1054
|
+
default: '',
|
|
1055
|
+
description: 'Name for the webhook (optional, defaults to auto-generated name)',
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
displayName: 'Callback URL',
|
|
1059
|
+
name: 'callbackUrl',
|
|
1060
|
+
type: 'string',
|
|
1061
|
+
displayOptions: {
|
|
1062
|
+
show: {
|
|
1063
|
+
resource: ['webhook'],
|
|
1064
|
+
operation: ['createWebhook'],
|
|
1065
|
+
},
|
|
1066
|
+
},
|
|
1067
|
+
default: '={{ $env.WEBHOOK_URL || "https://your-n8n-instance.com/webhook/" }}{{ $workflow.id }}',
|
|
1068
|
+
required: false,
|
|
1069
|
+
description: 'The URL that Smartsheet will call when events occur. Leave empty to auto-generate from WEBHOOK_URL environment variable. Must be publicly accessible (not localhost).',
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
displayName: 'Events',
|
|
1073
|
+
name: 'events',
|
|
1074
|
+
type: 'multiOptions',
|
|
1075
|
+
displayOptions: {
|
|
1076
|
+
show: {
|
|
1077
|
+
resource: ['webhook'],
|
|
1078
|
+
operation: ['createWebhook'],
|
|
1079
|
+
},
|
|
1080
|
+
},
|
|
1081
|
+
options: [
|
|
1082
|
+
{
|
|
1083
|
+
name: 'All Events',
|
|
1084
|
+
value: '*.*',
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
name: 'Row Created',
|
|
1088
|
+
value: 'sheet.rowCreated',
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
name: 'Row Updated',
|
|
1092
|
+
value: 'sheet.rowUpdated',
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
name: 'Row Deleted',
|
|
1096
|
+
value: 'sheet.rowDeleted',
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
name: 'Sheet Created',
|
|
1100
|
+
value: 'sheet.created',
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
name: 'Sheet Updated',
|
|
1104
|
+
value: 'sheet.updated',
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
name: 'Sheet Deleted',
|
|
1108
|
+
value: 'sheet.deleted',
|
|
1109
|
+
},
|
|
1110
|
+
],
|
|
1111
|
+
default: ['*.*'],
|
|
1112
|
+
description: 'Events to subscribe to',
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
displayName: 'Update Fields',
|
|
1116
|
+
name: 'updateFields',
|
|
1117
|
+
type: 'collection',
|
|
1118
|
+
displayOptions: {
|
|
1119
|
+
show: {
|
|
1120
|
+
resource: ['webhook'],
|
|
1121
|
+
operation: ['updateWebhook'],
|
|
1122
|
+
},
|
|
1123
|
+
},
|
|
1124
|
+
default: {},
|
|
1125
|
+
placeholder: 'Add Field',
|
|
1126
|
+
options: [
|
|
1127
|
+
{
|
|
1128
|
+
displayName: 'Name',
|
|
1129
|
+
name: 'name',
|
|
1130
|
+
type: 'string',
|
|
1131
|
+
default: '',
|
|
1132
|
+
description: 'New name for the webhook',
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
displayName: 'Enabled',
|
|
1136
|
+
name: 'enabled',
|
|
1137
|
+
type: 'boolean',
|
|
1138
|
+
default: true,
|
|
1139
|
+
description: 'Whether the webhook is enabled',
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
displayName: 'Events',
|
|
1143
|
+
name: 'events',
|
|
1144
|
+
type: 'multiOptions',
|
|
1145
|
+
options: [
|
|
1146
|
+
{
|
|
1147
|
+
name: 'All Events',
|
|
1148
|
+
value: '*.*',
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
name: 'Row Created',
|
|
1152
|
+
value: 'sheet.rowCreated',
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
name: 'Row Updated',
|
|
1156
|
+
value: 'sheet.rowUpdated',
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
name: 'Row Deleted',
|
|
1160
|
+
value: 'sheet.rowDeleted',
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
name: 'Sheet Created',
|
|
1164
|
+
value: 'sheet.created',
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
name: 'Sheet Updated',
|
|
1168
|
+
value: 'sheet.updated',
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
name: 'Sheet Deleted',
|
|
1172
|
+
value: 'sheet.deleted',
|
|
1173
|
+
},
|
|
1174
|
+
],
|
|
1175
|
+
default: ['*.*'],
|
|
1176
|
+
description: 'Events to subscribe to',
|
|
1177
|
+
},
|
|
1178
|
+
],
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
displayName: 'Operation',
|
|
1182
|
+
name: 'operation',
|
|
1183
|
+
type: 'options',
|
|
1184
|
+
noDataExpression: true,
|
|
1185
|
+
displayOptions: {
|
|
1186
|
+
show: {
|
|
1187
|
+
resource: ['report'],
|
|
1188
|
+
},
|
|
1189
|
+
},
|
|
1190
|
+
options: [
|
|
1191
|
+
{
|
|
1192
|
+
name: 'Get',
|
|
1193
|
+
value: 'getReport',
|
|
1194
|
+
description: 'Get details of a specific report',
|
|
1195
|
+
action: 'Get a report',
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
name: 'List',
|
|
1199
|
+
value: 'listReports',
|
|
1200
|
+
description: 'Get a list of all reports',
|
|
1201
|
+
action: 'List all reports',
|
|
1202
|
+
},
|
|
1203
|
+
],
|
|
1204
|
+
default: 'listReports',
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
displayName: 'Report Name or ID',
|
|
1208
|
+
name: 'reportId',
|
|
1209
|
+
type: 'options',
|
|
1210
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
1211
|
+
typeOptions: {
|
|
1212
|
+
loadOptionsMethod: 'getReports',
|
|
1213
|
+
},
|
|
1214
|
+
displayOptions: {
|
|
1215
|
+
show: {
|
|
1216
|
+
resource: ['report'],
|
|
1217
|
+
operation: ['getReport'],
|
|
1218
|
+
},
|
|
1219
|
+
},
|
|
1220
|
+
default: '',
|
|
1221
|
+
required: true,
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
displayName: 'Include',
|
|
1225
|
+
name: 'include',
|
|
1226
|
+
type: 'multiOptions',
|
|
1227
|
+
displayOptions: {
|
|
1228
|
+
show: {
|
|
1229
|
+
resource: ['report'],
|
|
1230
|
+
operation: ['getReport'],
|
|
1231
|
+
},
|
|
1232
|
+
},
|
|
1233
|
+
options: [
|
|
1234
|
+
{
|
|
1235
|
+
name: 'Attachments',
|
|
1236
|
+
value: 'attachments',
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
name: 'Cell Links',
|
|
1240
|
+
value: 'cellLinks',
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
name: 'Discussions',
|
|
1244
|
+
value: 'discussions',
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
name: 'Format',
|
|
1248
|
+
value: 'format',
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
name: 'Object Value',
|
|
1252
|
+
value: 'objectValue',
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
name: 'Row Attachments',
|
|
1256
|
+
value: 'rowAttachments',
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
name: 'Row Permalink',
|
|
1260
|
+
value: 'rowPermalink',
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
name: 'Source',
|
|
1264
|
+
value: 'source',
|
|
1265
|
+
},
|
|
1266
|
+
],
|
|
1267
|
+
default: [],
|
|
1268
|
+
description: 'Additional fields to include in the response',
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
displayName: 'Exclude',
|
|
1272
|
+
name: 'exclude',
|
|
1273
|
+
type: 'multiOptions',
|
|
1274
|
+
displayOptions: {
|
|
1275
|
+
show: {
|
|
1276
|
+
resource: ['report'],
|
|
1277
|
+
operation: ['getReport'],
|
|
1278
|
+
},
|
|
1279
|
+
},
|
|
1280
|
+
options: [
|
|
1281
|
+
{
|
|
1282
|
+
name: 'Attachments',
|
|
1283
|
+
value: 'attachments',
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
name: 'Cell Links',
|
|
1287
|
+
value: 'cellLinks',
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
name: 'Discussions',
|
|
1291
|
+
value: 'discussions',
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
name: 'Format',
|
|
1295
|
+
value: 'format',
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
name: 'Object Value',
|
|
1299
|
+
value: 'objectValue',
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
name: 'Row Attachments',
|
|
1303
|
+
value: 'rowAttachments',
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
name: 'Row Permalink',
|
|
1307
|
+
value: 'rowPermalink',
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
name: 'Source',
|
|
1311
|
+
value: 'source',
|
|
1312
|
+
},
|
|
1313
|
+
],
|
|
1314
|
+
default: [],
|
|
1315
|
+
description: 'Fields to exclude from the response',
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
displayName: 'Operation',
|
|
1319
|
+
name: 'operation',
|
|
1320
|
+
type: 'options',
|
|
1321
|
+
noDataExpression: true,
|
|
1322
|
+
displayOptions: {
|
|
1323
|
+
show: {
|
|
1324
|
+
resource: ['admin'],
|
|
1325
|
+
},
|
|
1326
|
+
},
|
|
1327
|
+
options: [
|
|
1328
|
+
{
|
|
1329
|
+
name: 'User',
|
|
1330
|
+
value: 'user',
|
|
1331
|
+
description: 'Manage users',
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
name: 'Group',
|
|
1335
|
+
value: 'group',
|
|
1336
|
+
description: 'Manage groups',
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
name: 'Group Member',
|
|
1340
|
+
value: 'groupMember',
|
|
1341
|
+
description: 'Manage group members',
|
|
1342
|
+
},
|
|
1343
|
+
],
|
|
1344
|
+
default: 'user',
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
displayName: 'User Operation',
|
|
1348
|
+
name: 'userOperation',
|
|
1349
|
+
type: 'options',
|
|
1350
|
+
displayOptions: {
|
|
1351
|
+
show: {
|
|
1352
|
+
resource: ['admin'],
|
|
1353
|
+
operation: ['user'],
|
|
1354
|
+
},
|
|
1355
|
+
},
|
|
1356
|
+
options: [
|
|
1357
|
+
{
|
|
1358
|
+
name: 'Add',
|
|
1359
|
+
value: 'addUser',
|
|
1360
|
+
description: 'Add a new user',
|
|
1361
|
+
action: 'Add a user',
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
name: 'Delete',
|
|
1365
|
+
value: 'deleteUser',
|
|
1366
|
+
description: 'Delete a user',
|
|
1367
|
+
action: 'Delete a user',
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
name: 'Get',
|
|
1371
|
+
value: 'getUser',
|
|
1372
|
+
description: 'Get user details',
|
|
1373
|
+
action: 'Get a user',
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
name: 'List',
|
|
1377
|
+
value: 'listUsers',
|
|
1378
|
+
description: 'List all users',
|
|
1379
|
+
action: 'List all users',
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
name: 'Update',
|
|
1383
|
+
value: 'updateUser',
|
|
1384
|
+
description: 'Update a user',
|
|
1385
|
+
action: 'Update a user',
|
|
1386
|
+
},
|
|
1387
|
+
],
|
|
1388
|
+
default: 'listUsers',
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
displayName: 'Group Operation',
|
|
1392
|
+
name: 'groupOperation',
|
|
1393
|
+
type: 'options',
|
|
1394
|
+
displayOptions: {
|
|
1395
|
+
show: {
|
|
1396
|
+
resource: ['admin'],
|
|
1397
|
+
operation: ['group'],
|
|
1398
|
+
},
|
|
1399
|
+
},
|
|
1400
|
+
options: [
|
|
1401
|
+
{
|
|
1402
|
+
name: 'Create',
|
|
1403
|
+
value: 'createGroup',
|
|
1404
|
+
description: 'Create a new group',
|
|
1405
|
+
action: 'Create a group',
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
name: 'Delete',
|
|
1409
|
+
value: 'deleteGroup',
|
|
1410
|
+
description: 'Delete a group',
|
|
1411
|
+
action: 'Delete a group',
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
name: 'Get',
|
|
1415
|
+
value: 'getGroup',
|
|
1416
|
+
description: 'Get group details',
|
|
1417
|
+
action: 'Get a group',
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
name: 'List',
|
|
1421
|
+
value: 'listGroups',
|
|
1422
|
+
description: 'List all groups',
|
|
1423
|
+
action: 'List all groups',
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
name: 'Update',
|
|
1427
|
+
value: 'updateGroup',
|
|
1428
|
+
description: 'Update a group',
|
|
1429
|
+
action: 'Update a group',
|
|
1430
|
+
},
|
|
1431
|
+
],
|
|
1432
|
+
default: 'listGroups',
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
displayName: 'Group Member Operation',
|
|
1436
|
+
name: 'groupMemberOperation',
|
|
1437
|
+
type: 'options',
|
|
1438
|
+
displayOptions: {
|
|
1439
|
+
show: {
|
|
1440
|
+
resource: ['admin'],
|
|
1441
|
+
operation: ['groupMember'],
|
|
1442
|
+
},
|
|
1443
|
+
},
|
|
1444
|
+
options: [
|
|
1445
|
+
{
|
|
1446
|
+
name: 'Add',
|
|
1447
|
+
value: 'addGroupMembers',
|
|
1448
|
+
description: 'Add members to a group',
|
|
1449
|
+
action: 'Add group members',
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
name: 'List',
|
|
1453
|
+
value: 'listGroupMembers',
|
|
1454
|
+
description: 'List members of a group',
|
|
1455
|
+
action: 'List group members',
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
name: 'Remove',
|
|
1459
|
+
value: 'removeGroupMember',
|
|
1460
|
+
description: 'Remove a member from a group',
|
|
1461
|
+
action: 'Remove a group member',
|
|
1462
|
+
},
|
|
1463
|
+
],
|
|
1464
|
+
default: 'listGroupMembers',
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
displayName: 'User Input Method',
|
|
1468
|
+
name: 'userInputMethod',
|
|
1469
|
+
type: 'options',
|
|
1470
|
+
displayOptions: {
|
|
1471
|
+
show: {
|
|
1472
|
+
resource: ['admin'],
|
|
1473
|
+
operation: ['user'],
|
|
1474
|
+
userOperation: ['getUser', 'updateUser', 'deleteUser'],
|
|
1475
|
+
},
|
|
1476
|
+
},
|
|
1477
|
+
options: [
|
|
1478
|
+
{
|
|
1479
|
+
name: 'Select from List',
|
|
1480
|
+
value: 'list',
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
name: 'Enter User ID',
|
|
1484
|
+
value: 'id',
|
|
1485
|
+
},
|
|
1486
|
+
],
|
|
1487
|
+
default: 'list',
|
|
1488
|
+
description: 'Choose how to specify the user',
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
displayName: 'User',
|
|
1492
|
+
name: 'userId',
|
|
1493
|
+
type: 'options',
|
|
1494
|
+
description: 'Select a user from the list',
|
|
1495
|
+
typeOptions: {
|
|
1496
|
+
loadOptionsMethod: 'getUsers',
|
|
1497
|
+
searchable: true,
|
|
1498
|
+
},
|
|
1499
|
+
displayOptions: {
|
|
1500
|
+
show: {
|
|
1501
|
+
resource: ['admin'],
|
|
1502
|
+
operation: ['user'],
|
|
1503
|
+
userOperation: ['getUser', 'updateUser', 'deleteUser'],
|
|
1504
|
+
userInputMethod: ['list'],
|
|
1505
|
+
},
|
|
1506
|
+
},
|
|
1507
|
+
default: '',
|
|
1508
|
+
required: true,
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
displayName: 'User ID',
|
|
1512
|
+
name: 'userIdManual',
|
|
1513
|
+
type: 'string',
|
|
1514
|
+
description: 'Enter the User ID manually',
|
|
1515
|
+
displayOptions: {
|
|
1516
|
+
show: {
|
|
1517
|
+
resource: ['admin'],
|
|
1518
|
+
operation: ['user'],
|
|
1519
|
+
userOperation: ['getUser', 'updateUser', 'deleteUser'],
|
|
1520
|
+
userInputMethod: ['id'],
|
|
1521
|
+
},
|
|
1522
|
+
},
|
|
1523
|
+
default: '',
|
|
1524
|
+
required: true,
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
displayName: 'Group Input Method',
|
|
1528
|
+
name: 'groupInputMethod',
|
|
1529
|
+
type: 'options',
|
|
1530
|
+
displayOptions: {
|
|
1531
|
+
show: {
|
|
1532
|
+
resource: ['admin'],
|
|
1533
|
+
operation: ['group', 'groupMember'],
|
|
1534
|
+
},
|
|
1535
|
+
hide: {
|
|
1536
|
+
resource: ['admin'],
|
|
1537
|
+
operation: ['group'],
|
|
1538
|
+
groupOperation: ['listGroups', 'createGroup'],
|
|
1539
|
+
},
|
|
1540
|
+
},
|
|
1541
|
+
options: [
|
|
1542
|
+
{
|
|
1543
|
+
name: 'Select from List',
|
|
1544
|
+
value: 'list',
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
name: 'Enter Group ID',
|
|
1548
|
+
value: 'id',
|
|
1549
|
+
},
|
|
1550
|
+
],
|
|
1551
|
+
default: 'list',
|
|
1552
|
+
description: 'Choose how to specify the group',
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
displayName: 'Group',
|
|
1556
|
+
name: 'groupId',
|
|
1557
|
+
type: 'options',
|
|
1558
|
+
description: 'Select a group from the list',
|
|
1559
|
+
typeOptions: {
|
|
1560
|
+
loadOptionsMethod: 'getGroups',
|
|
1561
|
+
searchable: true,
|
|
1562
|
+
},
|
|
1563
|
+
displayOptions: {
|
|
1564
|
+
show: {
|
|
1565
|
+
resource: ['admin'],
|
|
1566
|
+
operation: ['group', 'groupMember'],
|
|
1567
|
+
groupInputMethod: ['list'],
|
|
1568
|
+
},
|
|
1569
|
+
hide: {
|
|
1570
|
+
resource: ['admin'],
|
|
1571
|
+
operation: ['group'],
|
|
1572
|
+
groupOperation: ['listGroups', 'createGroup'],
|
|
1573
|
+
},
|
|
1574
|
+
},
|
|
1575
|
+
default: '',
|
|
1576
|
+
required: true,
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
displayName: 'Group ID',
|
|
1580
|
+
name: 'groupIdManual',
|
|
1581
|
+
type: 'string',
|
|
1582
|
+
description: 'Enter the Group ID manually',
|
|
1583
|
+
displayOptions: {
|
|
1584
|
+
show: {
|
|
1585
|
+
resource: ['admin'],
|
|
1586
|
+
operation: ['group', 'groupMember'],
|
|
1587
|
+
groupInputMethod: ['id'],
|
|
1588
|
+
},
|
|
1589
|
+
hide: {
|
|
1590
|
+
resource: ['admin'],
|
|
1591
|
+
operation: ['group'],
|
|
1592
|
+
groupOperation: ['listGroups', 'createGroup'],
|
|
1593
|
+
},
|
|
1594
|
+
},
|
|
1595
|
+
default: '',
|
|
1596
|
+
required: true,
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
displayName: 'Email',
|
|
1600
|
+
name: 'email',
|
|
1601
|
+
type: 'string',
|
|
1602
|
+
displayOptions: {
|
|
1603
|
+
show: {
|
|
1604
|
+
resource: ['admin'],
|
|
1605
|
+
operation: ['user'],
|
|
1606
|
+
userOperation: ['addUser'],
|
|
1607
|
+
},
|
|
1608
|
+
},
|
|
1609
|
+
default: '',
|
|
1610
|
+
required: true,
|
|
1611
|
+
description: 'Email address of the user',
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
displayName: 'First Name',
|
|
1615
|
+
name: 'firstName',
|
|
1616
|
+
type: 'string',
|
|
1617
|
+
displayOptions: {
|
|
1618
|
+
show: {
|
|
1619
|
+
resource: ['admin'],
|
|
1620
|
+
operation: ['user'],
|
|
1621
|
+
userOperation: ['addUser', 'updateUser'],
|
|
1622
|
+
},
|
|
1623
|
+
},
|
|
1624
|
+
default: '',
|
|
1625
|
+
description: 'First name of the user',
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
displayName: 'Last Name',
|
|
1629
|
+
name: 'lastName',
|
|
1630
|
+
type: 'string',
|
|
1631
|
+
displayOptions: {
|
|
1632
|
+
show: {
|
|
1633
|
+
resource: ['admin'],
|
|
1634
|
+
operation: ['user'],
|
|
1635
|
+
userOperation: ['addUser', 'updateUser'],
|
|
1636
|
+
},
|
|
1637
|
+
},
|
|
1638
|
+
default: '',
|
|
1639
|
+
description: 'Last name of the user',
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
displayName: 'Admin',
|
|
1643
|
+
name: 'admin',
|
|
1644
|
+
type: 'boolean',
|
|
1645
|
+
displayOptions: {
|
|
1646
|
+
show: {
|
|
1647
|
+
resource: ['admin'],
|
|
1648
|
+
operation: ['user'],
|
|
1649
|
+
userOperation: ['addUser', 'updateUser'],
|
|
1650
|
+
},
|
|
1651
|
+
},
|
|
1652
|
+
default: false,
|
|
1653
|
+
description: 'Whether the user is an admin',
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
displayName: 'Licensed Sheet Creator',
|
|
1657
|
+
name: 'licensedSheetCreator',
|
|
1658
|
+
type: 'boolean',
|
|
1659
|
+
displayOptions: {
|
|
1660
|
+
show: {
|
|
1661
|
+
resource: ['admin'],
|
|
1662
|
+
operation: ['user'],
|
|
1663
|
+
userOperation: ['addUser', 'updateUser'],
|
|
1664
|
+
},
|
|
1665
|
+
},
|
|
1666
|
+
default: false,
|
|
1667
|
+
description: 'Whether the user is a licensed sheet creator',
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
displayName: 'Group Name',
|
|
1671
|
+
name: 'groupName',
|
|
1672
|
+
type: 'string',
|
|
1673
|
+
displayOptions: {
|
|
1674
|
+
show: {
|
|
1675
|
+
resource: ['admin'],
|
|
1676
|
+
operation: ['group'],
|
|
1677
|
+
groupOperation: ['createGroup', 'updateGroup'],
|
|
1678
|
+
},
|
|
1679
|
+
},
|
|
1680
|
+
default: '',
|
|
1681
|
+
required: true,
|
|
1682
|
+
description: 'Name of the group',
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
displayName: 'Description',
|
|
1686
|
+
name: 'description',
|
|
1687
|
+
type: 'string',
|
|
1688
|
+
displayOptions: {
|
|
1689
|
+
show: {
|
|
1690
|
+
resource: ['admin'],
|
|
1691
|
+
operation: ['group'],
|
|
1692
|
+
groupOperation: ['createGroup', 'updateGroup'],
|
|
1693
|
+
},
|
|
1694
|
+
},
|
|
1695
|
+
default: '',
|
|
1696
|
+
description: 'Description of the group',
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
displayName: 'Members',
|
|
1700
|
+
name: 'members',
|
|
1701
|
+
type: 'fixedCollection',
|
|
1702
|
+
typeOptions: {
|
|
1703
|
+
multipleValues: true,
|
|
1704
|
+
},
|
|
1705
|
+
displayOptions: {
|
|
1706
|
+
show: {
|
|
1707
|
+
resource: ['admin'],
|
|
1708
|
+
operation: ['groupMember'],
|
|
1709
|
+
groupMemberOperation: ['addGroupMembers'],
|
|
1710
|
+
},
|
|
1711
|
+
},
|
|
1712
|
+
default: {},
|
|
1713
|
+
placeholder: 'Add Member',
|
|
1714
|
+
description: 'Users to add to the group (by email address)',
|
|
1715
|
+
options: [
|
|
1716
|
+
{
|
|
1717
|
+
displayName: 'Member',
|
|
1718
|
+
name: 'member',
|
|
1719
|
+
values: [
|
|
1720
|
+
{
|
|
1721
|
+
displayName: 'Email',
|
|
1722
|
+
name: 'email',
|
|
1723
|
+
type: 'string',
|
|
1724
|
+
default: '',
|
|
1725
|
+
required: true,
|
|
1726
|
+
description: 'Email address of the user to add to the group',
|
|
1727
|
+
},
|
|
1728
|
+
],
|
|
1729
|
+
},
|
|
1730
|
+
],
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
displayName: 'Member User ID',
|
|
1734
|
+
name: 'memberUserId',
|
|
1735
|
+
type: 'options',
|
|
1736
|
+
description: 'The user to remove from the group. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
1737
|
+
typeOptions: {
|
|
1738
|
+
loadOptionsMethod: 'getGroupMembers',
|
|
1739
|
+
loadOptionsDependsOn: ['groupId'],
|
|
1740
|
+
searchable: true,
|
|
1741
|
+
},
|
|
1742
|
+
displayOptions: {
|
|
1743
|
+
show: {
|
|
1744
|
+
resource: ['admin'],
|
|
1745
|
+
operation: ['groupMember'],
|
|
1746
|
+
groupMemberOperation: ['removeGroupMember'],
|
|
1747
|
+
},
|
|
1748
|
+
},
|
|
1749
|
+
default: '',
|
|
1750
|
+
required: true,
|
|
1751
|
+
},
|
|
1752
|
+
],
|
|
1753
|
+
};
|
|
1754
|
+
this.methods = {
|
|
1755
|
+
loadOptions: {
|
|
1756
|
+
async getSheets() {
|
|
1757
|
+
const sheets = await SteyiSmartsheetApi_1.listSheets.call(this);
|
|
1758
|
+
if (!sheets || !sheets.data) {
|
|
1759
|
+
return [];
|
|
1760
|
+
}
|
|
1761
|
+
return sheets.data.map((sheet) => ({
|
|
1762
|
+
name: sheet.name,
|
|
1763
|
+
value: sheet.id.toString(),
|
|
1764
|
+
}));
|
|
1765
|
+
},
|
|
1766
|
+
async getColumns() {
|
|
1767
|
+
const sheetId = this.getNodeParameter('sheetId', 0);
|
|
1768
|
+
if (sheetId === undefined || sheetId === null || sheetId === '') {
|
|
1769
|
+
return [];
|
|
1770
|
+
}
|
|
1771
|
+
const columns = await SteyiSmartsheetApi_1.listColumns.call(this, parseInt(sheetId.toString()));
|
|
1772
|
+
if (!columns || !columns.data) {
|
|
1773
|
+
return [];
|
|
1774
|
+
}
|
|
1775
|
+
return columns.data.map((column) => ({
|
|
1776
|
+
name: column.title,
|
|
1777
|
+
value: column.id.toString(),
|
|
1778
|
+
}));
|
|
1779
|
+
},
|
|
1780
|
+
async getDiscussions() {
|
|
1781
|
+
const sheetId = this.getNodeParameter('sheetId', 0);
|
|
1782
|
+
const rowId = this.getNodeParameter('rowId', 0);
|
|
1783
|
+
if (!sheetId || !rowId || sheetId === '' || rowId === '') {
|
|
1784
|
+
return [];
|
|
1785
|
+
}
|
|
1786
|
+
try {
|
|
1787
|
+
const discussions = await SteyiGenericFunction_1.smartsheetApiRequest.call(this, 'GET', `/sheets/${sheetId}/rows/${rowId}/discussions?include=comments`, {}, 0);
|
|
1788
|
+
let discussionsList = [];
|
|
1789
|
+
if (discussions && discussions.data && Array.isArray(discussions.data)) {
|
|
1790
|
+
discussionsList = discussions.data;
|
|
1791
|
+
}
|
|
1792
|
+
else if (discussions && Array.isArray(discussions)) {
|
|
1793
|
+
discussionsList = discussions;
|
|
1794
|
+
}
|
|
1795
|
+
if (discussionsList.length === 0) {
|
|
1796
|
+
return [];
|
|
1797
|
+
}
|
|
1798
|
+
return discussionsList.map((disc) => {
|
|
1799
|
+
// Get first comment text for display
|
|
1800
|
+
const firstComment = disc.comments && Array.isArray(disc.comments) && disc.comments.length > 0
|
|
1801
|
+
? disc.comments[0].text
|
|
1802
|
+
: (disc.comment?.text || 'Discussion');
|
|
1803
|
+
const commentPreview = firstComment ? firstComment.substring(0, 50) : 'Discussion';
|
|
1804
|
+
return {
|
|
1805
|
+
name: `${commentPreview}${firstComment && firstComment.length > 50 ? '...' : ''} (ID: ${disc.id})`,
|
|
1806
|
+
value: disc.id.toString(),
|
|
1807
|
+
};
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1810
|
+
catch (error) {
|
|
1811
|
+
// Return empty array on error - don't break the UI
|
|
1812
|
+
return [];
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
async getWebhooks() {
|
|
1816
|
+
try {
|
|
1817
|
+
const webhooks = await SteyiSmartsheetApi_1.listWebhooks.call(this);
|
|
1818
|
+
if (!webhooks || !webhooks.data) {
|
|
1819
|
+
return [];
|
|
1820
|
+
}
|
|
1821
|
+
return webhooks.data.map((webhook) => ({
|
|
1822
|
+
name: webhook.name || `Webhook ${webhook.id}`,
|
|
1823
|
+
value: webhook.id.toString(),
|
|
1824
|
+
}));
|
|
1825
|
+
}
|
|
1826
|
+
catch (error) {
|
|
1827
|
+
// Return empty array on error - don't break the UI
|
|
1828
|
+
return [];
|
|
1829
|
+
}
|
|
1830
|
+
},
|
|
1831
|
+
async getReports() {
|
|
1832
|
+
try {
|
|
1833
|
+
const reports = await SteyiSmartsheetApi_1.listReports.call(this, true);
|
|
1834
|
+
if (!reports || !reports.data) {
|
|
1835
|
+
return [];
|
|
1836
|
+
}
|
|
1837
|
+
return reports.data.map((report) => ({
|
|
1838
|
+
name: report.name || `Report ${report.id}`,
|
|
1839
|
+
value: report.id.toString(),
|
|
1840
|
+
}));
|
|
1841
|
+
}
|
|
1842
|
+
catch (error) {
|
|
1843
|
+
// Return empty array on error - don't break the UI
|
|
1844
|
+
return [];
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
async getWorkspaces() {
|
|
1848
|
+
try {
|
|
1849
|
+
const workspaces = await SteyiSmartsheetApi_1.listWorkspaces.call(this);
|
|
1850
|
+
if (!workspaces || !workspaces.data) {
|
|
1851
|
+
return [];
|
|
1852
|
+
}
|
|
1853
|
+
return workspaces.data.map((workspace) => ({
|
|
1854
|
+
name: workspace.name || `Workspace ${workspace.id}`,
|
|
1855
|
+
value: workspace.id.toString(),
|
|
1856
|
+
}));
|
|
1857
|
+
}
|
|
1858
|
+
catch (error) {
|
|
1859
|
+
// Return empty array on error - don't break the UI
|
|
1860
|
+
return [];
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
async getFolders() {
|
|
1864
|
+
const workspaceId = this.getNodeParameter('workspaceId', 0);
|
|
1865
|
+
if (!workspaceId || workspaceId === '') {
|
|
1866
|
+
return [];
|
|
1867
|
+
}
|
|
1868
|
+
try {
|
|
1869
|
+
const folders = await SteyiSmartsheetApi_1.listFolders.call(this, parseInt(workspaceId.toString()));
|
|
1870
|
+
if (!folders || !folders.data) {
|
|
1871
|
+
return [];
|
|
1872
|
+
}
|
|
1873
|
+
return folders.data.map((folder) => ({
|
|
1874
|
+
name: folder.name || `Folder ${folder.id}`,
|
|
1875
|
+
value: folder.id.toString(),
|
|
1876
|
+
}));
|
|
1877
|
+
}
|
|
1878
|
+
catch (error) {
|
|
1879
|
+
// Return empty array on error - don't break the UI
|
|
1880
|
+
return [];
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1883
|
+
async getUsers() {
|
|
1884
|
+
try {
|
|
1885
|
+
const users = await SteyiSmartsheetApi_1.listUsers.call(this);
|
|
1886
|
+
if (!users || !users.data) {
|
|
1887
|
+
return [];
|
|
1888
|
+
}
|
|
1889
|
+
return users.data.map((user) => ({
|
|
1890
|
+
name: `${user.firstName || ''} ${user.lastName || ''}`.trim() || user.email || `User ${user.id}`,
|
|
1891
|
+
value: user.id.toString(),
|
|
1892
|
+
}));
|
|
1893
|
+
}
|
|
1894
|
+
catch (error) {
|
|
1895
|
+
// Return empty array on error - don't break the UI
|
|
1896
|
+
return [];
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
async getGroups() {
|
|
1900
|
+
try {
|
|
1901
|
+
const groups = await SteyiSmartsheetApi_1.listGroups.call(this, true);
|
|
1902
|
+
if (!groups || !groups.data) {
|
|
1903
|
+
return [];
|
|
1904
|
+
}
|
|
1905
|
+
return groups.data.map((group) => ({
|
|
1906
|
+
name: group.name || `Group ${group.id}`,
|
|
1907
|
+
value: group.id.toString(),
|
|
1908
|
+
}));
|
|
1909
|
+
}
|
|
1910
|
+
catch (error) {
|
|
1911
|
+
// Return empty array on error - don't break the UI
|
|
1912
|
+
return [];
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
async getGroupMembers() {
|
|
1916
|
+
const groupId = this.getNodeParameter('groupId', 0);
|
|
1917
|
+
if (!groupId || groupId === '') {
|
|
1918
|
+
return [];
|
|
1919
|
+
}
|
|
1920
|
+
try {
|
|
1921
|
+
const members = await SteyiSmartsheetApi_1.listGroupMembers.call(this, parseInt(groupId.toString()));
|
|
1922
|
+
if (!members || !members.data) {
|
|
1923
|
+
return [];
|
|
1924
|
+
}
|
|
1925
|
+
return members.data.map((member) => ({
|
|
1926
|
+
name: `${member.firstName || ''} ${member.lastName || ''}`.trim() || member.email || `User ${member.id}`,
|
|
1927
|
+
value: member.id.toString(),
|
|
1928
|
+
}));
|
|
1929
|
+
}
|
|
1930
|
+
catch (error) {
|
|
1931
|
+
// Return empty array on error - don't break the UI
|
|
1932
|
+
return [];
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
},
|
|
1936
|
+
};
|
|
1937
|
+
}
|
|
1938
|
+
async execute() {
|
|
1939
|
+
const items = this.getInputData();
|
|
1940
|
+
const returnData = [];
|
|
1941
|
+
for (let i = 0; i < items.length; i++) {
|
|
1942
|
+
const resource = this.getNodeParameter('resource', i);
|
|
1943
|
+
const operation = this.getNodeParameter('operation', i);
|
|
1944
|
+
try {
|
|
1945
|
+
if (resource === 'sheet') {
|
|
1946
|
+
const result = await Sheets_1.executeSheetOperation.call(this, operation, i);
|
|
1947
|
+
returnData.push(result);
|
|
1948
|
+
}
|
|
1949
|
+
else if (resource === 'row') {
|
|
1950
|
+
const result = await Rows_1.executeRowOperation.call(this, operation, i);
|
|
1951
|
+
returnData.push(result);
|
|
1952
|
+
}
|
|
1953
|
+
else if (resource === 'column') {
|
|
1954
|
+
const operation = this.getNodeParameter('operation', i);
|
|
1955
|
+
const result = await Columns_1.executeColumnOperation.call(this, operation, i);
|
|
1956
|
+
returnData.push(result);
|
|
1957
|
+
}
|
|
1958
|
+
else if (resource === 'webhook') {
|
|
1959
|
+
const result = await Webhooks_1.executeWebhookOperation.call(this, operation, i);
|
|
1960
|
+
returnData.push(result);
|
|
1961
|
+
}
|
|
1962
|
+
else if (resource === 'report') {
|
|
1963
|
+
const result = await Reports_1.executeReportOperation.call(this, operation, i);
|
|
1964
|
+
returnData.push(result);
|
|
1965
|
+
}
|
|
1966
|
+
else if (resource === 'admin') {
|
|
1967
|
+
const result = await Admin_1.executeAdminOperation.call(this, operation, i);
|
|
1968
|
+
returnData.push(result);
|
|
1969
|
+
}
|
|
1970
|
+
else {
|
|
1971
|
+
throw new Error(`Unknown resource: ${resource}`);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
catch (error) {
|
|
1975
|
+
if (this.continueOnFail()) {
|
|
1976
|
+
returnData.push({
|
|
1977
|
+
json: { error: error.message },
|
|
1978
|
+
pairedItem: { item: i },
|
|
1979
|
+
});
|
|
1980
|
+
continue;
|
|
1981
|
+
}
|
|
1982
|
+
throw error;
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
return [returnData];
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
exports.SteyiSmartsheet = SteyiSmartsheet;
|