n8n-nodes-upload-post 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +70 -0
- package/dist/credentials/HttpBinApi.credentials.d.ts +9 -0
- package/dist/credentials/HttpBinApi.credentials.js +43 -0
- package/dist/credentials/HttpBinApi.credentials.js.map +1 -0
- package/dist/credentials/UploadPostApi.credentials.d.ts +9 -0
- package/dist/credentials/UploadPostApi.credentials.js +42 -0
- package/dist/credentials/UploadPostApi.credentials.js.map +1 -0
- package/dist/nodes/HttpBin/HttpBin.node.json +18 -0
- package/dist/nodes/HttpBin/httpbin.svg +18 -0
- package/dist/nodes/UploadPost/UploadPost.node.d.ts +5 -0
- package/dist/nodes/UploadPost/UploadPost.node.js +1174 -0
- package/dist/nodes/UploadPost/UploadPost.node.js.map +1 -0
- package/dist/package.json +55 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +55 -0
|
@@ -0,0 +1,1174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UploadPost = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class UploadPost {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Upload Post',
|
|
9
|
+
name: 'uploadPost',
|
|
10
|
+
icon: 'file:uploadpost.svg',
|
|
11
|
+
group: ['output'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
+
description: 'Upload content to social media via Upload-Post API',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Upload Post',
|
|
17
|
+
},
|
|
18
|
+
inputs: ["main"],
|
|
19
|
+
outputs: ["main"],
|
|
20
|
+
credentials: [
|
|
21
|
+
{
|
|
22
|
+
name: 'uploadPostApi',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
requestDefaults: {
|
|
27
|
+
baseURL: 'https://api.upload-post.com/api',
|
|
28
|
+
headers: {
|
|
29
|
+
'Accept': 'application/json',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
properties: [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'My String',
|
|
35
|
+
name: 'myString',
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: '',
|
|
38
|
+
placeholder: 'Placeholder value',
|
|
39
|
+
description: 'The description text',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Operation',
|
|
43
|
+
name: 'operation',
|
|
44
|
+
type: 'options',
|
|
45
|
+
noDataExpression: true,
|
|
46
|
+
options: [
|
|
47
|
+
{
|
|
48
|
+
name: 'Upload Photo(s)',
|
|
49
|
+
value: 'uploadPhotos',
|
|
50
|
+
action: 'Upload photos',
|
|
51
|
+
description: 'Upload one or more photos',
|
|
52
|
+
routing: {
|
|
53
|
+
request: {
|
|
54
|
+
method: 'POST',
|
|
55
|
+
url: '/upload_photos',
|
|
56
|
+
body: {},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Upload Video',
|
|
62
|
+
value: 'uploadVideo',
|
|
63
|
+
action: 'Upload a video',
|
|
64
|
+
description: 'Upload a single video',
|
|
65
|
+
routing: {
|
|
66
|
+
request: {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
url: '/upload',
|
|
69
|
+
body: {},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Upload Text',
|
|
75
|
+
value: 'uploadText',
|
|
76
|
+
action: 'Upload a text post',
|
|
77
|
+
description: 'Upload a text-based post',
|
|
78
|
+
routing: {
|
|
79
|
+
request: {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
url: '/upload_text',
|
|
82
|
+
body: {},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
default: 'uploadPhotos',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
displayName: 'User Identifier',
|
|
91
|
+
name: 'user',
|
|
92
|
+
type: 'string',
|
|
93
|
+
required: true,
|
|
94
|
+
default: '',
|
|
95
|
+
description: 'User identifier for Upload-Post',
|
|
96
|
+
routing: {
|
|
97
|
+
send: {
|
|
98
|
+
type: 'body',
|
|
99
|
+
property: 'user',
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
displayName: 'Platform(s)',
|
|
105
|
+
name: 'platform',
|
|
106
|
+
type: 'multiOptions',
|
|
107
|
+
required: true,
|
|
108
|
+
options: [
|
|
109
|
+
{ name: 'Facebook', value: 'facebook' },
|
|
110
|
+
{ name: 'Instagram', value: 'instagram' },
|
|
111
|
+
{ name: 'LinkedIn', value: 'linkedin' },
|
|
112
|
+
{ name: 'Threads', value: 'threads' },
|
|
113
|
+
{ name: 'TikTok', value: 'tiktok' },
|
|
114
|
+
{ name: 'X (Twitter)', value: 'x' },
|
|
115
|
+
{ name: 'YouTube', value: 'youtube' },
|
|
116
|
+
],
|
|
117
|
+
default: [],
|
|
118
|
+
description: 'Platform(s) to upload to',
|
|
119
|
+
routing: {
|
|
120
|
+
send: {
|
|
121
|
+
type: 'body',
|
|
122
|
+
property: 'platform[]',
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
displayName: 'Title',
|
|
128
|
+
name: 'title',
|
|
129
|
+
type: 'string',
|
|
130
|
+
required: true,
|
|
131
|
+
default: '',
|
|
132
|
+
description: 'Title of the post/video/text',
|
|
133
|
+
routing: {
|
|
134
|
+
send: {
|
|
135
|
+
type: 'body',
|
|
136
|
+
property: 'title',
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
displayName: 'Photos (Files or URLs)',
|
|
142
|
+
name: 'photos',
|
|
143
|
+
type: 'string',
|
|
144
|
+
required: true,
|
|
145
|
+
default: '',
|
|
146
|
+
description: 'Array of photo files or photo URLs. For files, use binary property names like {{$binary.dataPropertyName}}. For URLs, provide direct HTTPS URLs as strings. Multiple items can be added via "Add Field".',
|
|
147
|
+
displayOptions: {
|
|
148
|
+
show: {
|
|
149
|
+
operation: ['uploadPhotos'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
typeOptions: {
|
|
153
|
+
multiple: true,
|
|
154
|
+
multipleValueButtonText: 'Add Photo',
|
|
155
|
+
},
|
|
156
|
+
routing: {
|
|
157
|
+
send: {
|
|
158
|
+
type: 'body',
|
|
159
|
+
property: 'photos[]',
|
|
160
|
+
value: '={{ $value.startsWith("http") ? $value : { "data": $value, "isBinary": true } }}',
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
displayName: 'Caption',
|
|
166
|
+
name: 'caption',
|
|
167
|
+
type: 'string',
|
|
168
|
+
default: '',
|
|
169
|
+
description: 'Caption/description for the photos (post commentary)',
|
|
170
|
+
displayOptions: {
|
|
171
|
+
show: {
|
|
172
|
+
operation: ['uploadPhotos'],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
routing: {
|
|
176
|
+
send: {
|
|
177
|
+
type: 'body',
|
|
178
|
+
property: 'caption',
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
displayName: 'Video (File or URL)',
|
|
184
|
+
name: 'video',
|
|
185
|
+
type: 'string',
|
|
186
|
+
required: true,
|
|
187
|
+
default: '',
|
|
188
|
+
description: 'The video file to upload or a video URL. For files, use binary property name like {{$binary.dataPropertyName}}.',
|
|
189
|
+
displayOptions: {
|
|
190
|
+
show: {
|
|
191
|
+
operation: ['uploadVideo'],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
routing: {
|
|
195
|
+
send: {
|
|
196
|
+
type: 'body',
|
|
197
|
+
property: 'video',
|
|
198
|
+
value: '={{ $value.startsWith("http") ? $value : { "data": $value, "isBinary": true } }}',
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
displayName: 'LinkedIn Visibility',
|
|
204
|
+
name: 'linkedinVisibility',
|
|
205
|
+
type: 'options',
|
|
206
|
+
options: [
|
|
207
|
+
{ name: 'Public', value: 'PUBLIC' },
|
|
208
|
+
{ name: 'Connections', value: 'CONNECTIONS', displayOptions: { show: { operation: ['uploadVideo'] } } },
|
|
209
|
+
{ name: 'Logged In', value: 'LOGGED_IN', displayOptions: { show: { operation: ['uploadVideo'] } } },
|
|
210
|
+
{ name: 'Container', value: 'CONTAINER', displayOptions: { show: { operation: ['uploadVideo'] } } },
|
|
211
|
+
],
|
|
212
|
+
default: 'PUBLIC',
|
|
213
|
+
description: 'Visibility setting for the LinkedIn post',
|
|
214
|
+
displayOptions: {
|
|
215
|
+
show: {
|
|
216
|
+
operation: ['uploadPhotos', 'uploadVideo', 'uploadText'],
|
|
217
|
+
platform: ['linkedin']
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
routing: {
|
|
221
|
+
send: {
|
|
222
|
+
type: 'body',
|
|
223
|
+
property: 'visibility',
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
displayName: 'Target LinkedIn Page ID',
|
|
229
|
+
name: 'targetLinkedinPageId',
|
|
230
|
+
type: 'string',
|
|
231
|
+
default: '',
|
|
232
|
+
description: 'LinkedIn page ID to upload to an organization (optional)',
|
|
233
|
+
displayOptions: {
|
|
234
|
+
show: {
|
|
235
|
+
operation: ['uploadPhotos', 'uploadVideo', 'uploadText'],
|
|
236
|
+
platform: ['linkedin']
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
routing: {
|
|
240
|
+
send: {
|
|
241
|
+
type: 'body',
|
|
242
|
+
property: 'target_linkedin_page_id',
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
displayName: 'LinkedIn Description',
|
|
248
|
+
name: 'linkedinDescription',
|
|
249
|
+
type: 'string',
|
|
250
|
+
default: '',
|
|
251
|
+
description: 'The user generated commentary for the post (LinkedIn Video/Text). If not provided, title is used for video.',
|
|
252
|
+
displayOptions: {
|
|
253
|
+
show: {
|
|
254
|
+
operation: ['uploadVideo', 'uploadText'],
|
|
255
|
+
platform: ['linkedin']
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
routing: {
|
|
259
|
+
send: {
|
|
260
|
+
type: 'body',
|
|
261
|
+
property: 'description',
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
displayName: 'Facebook Page ID',
|
|
267
|
+
name: 'facebookPageId',
|
|
268
|
+
type: 'string',
|
|
269
|
+
required: true,
|
|
270
|
+
default: '',
|
|
271
|
+
description: 'Facebook Page ID where the content will be posted',
|
|
272
|
+
displayOptions: {
|
|
273
|
+
show: {
|
|
274
|
+
operation: ['uploadPhotos', 'uploadVideo', 'uploadText'],
|
|
275
|
+
platform: ['facebook']
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
routing: {
|
|
279
|
+
send: {
|
|
280
|
+
type: 'body',
|
|
281
|
+
property: 'facebook_page_id',
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
displayName: 'Facebook Video Description',
|
|
287
|
+
name: 'facebookVideoDescription',
|
|
288
|
+
type: 'string',
|
|
289
|
+
default: '',
|
|
290
|
+
description: 'Description of the video for Facebook. If not provided, title is used.',
|
|
291
|
+
displayOptions: {
|
|
292
|
+
show: {
|
|
293
|
+
operation: ['uploadVideo'],
|
|
294
|
+
platform: ['facebook']
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
routing: {
|
|
298
|
+
send: {
|
|
299
|
+
type: 'body',
|
|
300
|
+
property: 'description',
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
displayName: 'Facebook Video State',
|
|
306
|
+
name: 'facebookVideoState',
|
|
307
|
+
type: 'options',
|
|
308
|
+
options: [
|
|
309
|
+
{ name: 'Published', value: 'PUBLISHED' },
|
|
310
|
+
{ name: 'Draft', value: 'DRAFT' },
|
|
311
|
+
{ name: 'Scheduled', value: 'SCHEDULED' },
|
|
312
|
+
],
|
|
313
|
+
default: 'PUBLISHED',
|
|
314
|
+
description: 'Desired state of the video on Facebook',
|
|
315
|
+
displayOptions: {
|
|
316
|
+
show: {
|
|
317
|
+
operation: ['uploadVideo'],
|
|
318
|
+
platform: ['facebook']
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
routing: {
|
|
322
|
+
send: {
|
|
323
|
+
type: 'body',
|
|
324
|
+
property: 'video_state',
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
displayName: 'TikTok Auto Add Music',
|
|
330
|
+
name: 'tiktokAutoAddMusic',
|
|
331
|
+
type: 'boolean',
|
|
332
|
+
default: false,
|
|
333
|
+
description: 'Whether to automatically add background music to photos on TikTok',
|
|
334
|
+
displayOptions: {
|
|
335
|
+
show: {
|
|
336
|
+
operation: ['uploadPhotos'],
|
|
337
|
+
platform: ['tiktok']
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
routing: {
|
|
341
|
+
send: {
|
|
342
|
+
type: 'body',
|
|
343
|
+
property: 'auto_add_music',
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
displayName: 'TikTok Disable Comment',
|
|
349
|
+
name: 'tiktokDisableComment',
|
|
350
|
+
type: 'boolean',
|
|
351
|
+
default: false,
|
|
352
|
+
description: 'Whether to disable comments on the TikTok post',
|
|
353
|
+
displayOptions: {
|
|
354
|
+
show: {
|
|
355
|
+
operation: ['uploadPhotos', 'uploadVideo'],
|
|
356
|
+
platform: ['tiktok']
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
routing: {
|
|
360
|
+
send: {
|
|
361
|
+
type: 'body',
|
|
362
|
+
property: 'disable_comment',
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
displayName: 'TikTok Branded Content (Photo)',
|
|
368
|
+
name: 'tiktokBrandedContentPhoto',
|
|
369
|
+
type: 'boolean',
|
|
370
|
+
default: false,
|
|
371
|
+
description: 'Whether to indicate if the photo post is branded content (requires Disclose Commercial to be true)',
|
|
372
|
+
displayOptions: {
|
|
373
|
+
show: {
|
|
374
|
+
operation: ['uploadPhotos'],
|
|
375
|
+
platform: ['tiktok']
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
routing: {
|
|
379
|
+
send: {
|
|
380
|
+
type: 'body',
|
|
381
|
+
property: 'branded_content',
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
displayName: 'TikTok Disclose Commercial (Photo)',
|
|
387
|
+
name: 'tiktokDiscloseCommercialPhoto',
|
|
388
|
+
type: 'boolean',
|
|
389
|
+
default: false,
|
|
390
|
+
description: 'Whether to disclose the commercial nature of the photo post (used with Branded Content)',
|
|
391
|
+
displayOptions: {
|
|
392
|
+
show: {
|
|
393
|
+
operation: ['uploadPhotos'],
|
|
394
|
+
platform: ['tiktok']
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
routing: {
|
|
398
|
+
send: {
|
|
399
|
+
type: 'body',
|
|
400
|
+
property: 'disclose_commercial',
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
displayName: 'TikTok Photo Cover Index',
|
|
406
|
+
name: 'tiktokPhotoCoverIndex',
|
|
407
|
+
type: 'number',
|
|
408
|
+
default: 0,
|
|
409
|
+
typeOptions: { minValue: 0 },
|
|
410
|
+
description: 'Index (starting at 0) of the photo to use as the cover/thumbnail for the TikTok photo post',
|
|
411
|
+
displayOptions: {
|
|
412
|
+
show: {
|
|
413
|
+
operation: ['uploadPhotos'],
|
|
414
|
+
platform: ['tiktok']
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
routing: {
|
|
418
|
+
send: {
|
|
419
|
+
type: 'body',
|
|
420
|
+
property: 'photo_cover_index',
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
displayName: 'TikTok Photo Description',
|
|
426
|
+
name: 'tiktokPhotoDescription',
|
|
427
|
+
type: 'string',
|
|
428
|
+
default: '',
|
|
429
|
+
description: 'Description for the TikTok photo post. If not provided, the common Title value will be used.',
|
|
430
|
+
displayOptions: {
|
|
431
|
+
show: {
|
|
432
|
+
operation: ['uploadPhotos'],
|
|
433
|
+
platform: ['tiktok']
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
routing: {
|
|
437
|
+
send: {
|
|
438
|
+
type: 'body',
|
|
439
|
+
property: 'description',
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
displayName: 'TikTok Privacy Level',
|
|
445
|
+
name: 'tiktokPrivacyLevel',
|
|
446
|
+
type: 'options',
|
|
447
|
+
options: [
|
|
448
|
+
{ name: 'Public to Everyone', value: 'PUBLIC_TO_EVERYONE' },
|
|
449
|
+
{ name: 'Mutual Follow Friends', value: 'MUTUAL_FOLLOW_FRIENDS' },
|
|
450
|
+
{ name: 'Follower of Creator', value: 'FOLLOWER_OF_CREATOR' },
|
|
451
|
+
{ name: 'Self Only', value: 'SELF_ONLY' },
|
|
452
|
+
],
|
|
453
|
+
default: 'PUBLIC_TO_EVERYONE',
|
|
454
|
+
description: 'Privacy setting for the TikTok video',
|
|
455
|
+
displayOptions: {
|
|
456
|
+
show: {
|
|
457
|
+
operation: ['uploadVideo'],
|
|
458
|
+
platform: ['tiktok']
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
routing: {
|
|
462
|
+
send: {
|
|
463
|
+
type: 'body',
|
|
464
|
+
property: 'privacy_level',
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
displayName: 'TikTok Disable Duet',
|
|
470
|
+
name: 'tiktokDisableDuet',
|
|
471
|
+
type: 'boolean',
|
|
472
|
+
default: false,
|
|
473
|
+
description: 'Whether to disable duet feature for the TikTok video',
|
|
474
|
+
displayOptions: {
|
|
475
|
+
show: {
|
|
476
|
+
operation: ['uploadVideo'],
|
|
477
|
+
platform: ['tiktok']
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
routing: {
|
|
481
|
+
send: {
|
|
482
|
+
type: 'body',
|
|
483
|
+
property: 'disable_duet',
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
displayName: 'TikTok Disable Stitch',
|
|
489
|
+
name: 'tiktokDisableStitch',
|
|
490
|
+
type: 'boolean',
|
|
491
|
+
default: false,
|
|
492
|
+
description: 'Whether to disable stitch feature for the TikTok video',
|
|
493
|
+
displayOptions: {
|
|
494
|
+
show: {
|
|
495
|
+
operation: ['uploadVideo'],
|
|
496
|
+
platform: ['tiktok']
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
routing: {
|
|
500
|
+
send: {
|
|
501
|
+
type: 'body',
|
|
502
|
+
property: 'disable_stitch',
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
displayName: 'TikTok Cover Timestamp (Ms)',
|
|
508
|
+
name: 'tiktokCoverTimestamp',
|
|
509
|
+
type: 'number',
|
|
510
|
+
default: 1000,
|
|
511
|
+
description: 'Timestamp in milliseconds for video cover on TikTok',
|
|
512
|
+
displayOptions: {
|
|
513
|
+
show: {
|
|
514
|
+
operation: ['uploadVideo'],
|
|
515
|
+
platform: ['tiktok']
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
routing: {
|
|
519
|
+
send: {
|
|
520
|
+
type: 'body',
|
|
521
|
+
property: 'cover_timestamp',
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
displayName: 'TikTok Brand Content Toggle',
|
|
527
|
+
name: 'tiktokBrandContentToggle',
|
|
528
|
+
type: 'boolean',
|
|
529
|
+
default: false,
|
|
530
|
+
description: 'Whether to enable branded content for TikTok video',
|
|
531
|
+
displayOptions: {
|
|
532
|
+
show: {
|
|
533
|
+
operation: ['uploadVideo'],
|
|
534
|
+
platform: ['tiktok']
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
routing: {
|
|
538
|
+
send: {
|
|
539
|
+
type: 'body',
|
|
540
|
+
property: 'brand_content_toggle',
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
displayName: 'TikTok Brand Organic',
|
|
546
|
+
name: 'tiktokBrandOrganic',
|
|
547
|
+
type: 'boolean',
|
|
548
|
+
default: false,
|
|
549
|
+
description: 'Whether to enable organic branded content for TikTok video',
|
|
550
|
+
displayOptions: {
|
|
551
|
+
show: {
|
|
552
|
+
operation: ['uploadVideo'],
|
|
553
|
+
platform: ['tiktok']
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
routing: {
|
|
557
|
+
send: {
|
|
558
|
+
type: 'body',
|
|
559
|
+
property: 'brand_organic',
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
displayName: 'TikTok Branded Content (Video)',
|
|
565
|
+
name: 'tiktokBrandedContentVideo',
|
|
566
|
+
type: 'boolean',
|
|
567
|
+
default: false,
|
|
568
|
+
description: 'Whether to enable branded content with disclosure for TikTok video',
|
|
569
|
+
displayOptions: {
|
|
570
|
+
show: {
|
|
571
|
+
operation: ['uploadVideo'],
|
|
572
|
+
platform: ['tiktok']
|
|
573
|
+
},
|
|
574
|
+
},
|
|
575
|
+
routing: {
|
|
576
|
+
send: {
|
|
577
|
+
type: 'body',
|
|
578
|
+
property: 'branded_content',
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
displayName: 'TikTok Brand Organic Toggle',
|
|
584
|
+
name: 'tiktokBrandOrganicToggle',
|
|
585
|
+
type: 'boolean',
|
|
586
|
+
default: false,
|
|
587
|
+
description: 'Whether to enable organic branded content toggle for TikTok video',
|
|
588
|
+
displayOptions: {
|
|
589
|
+
show: {
|
|
590
|
+
operation: ['uploadVideo'],
|
|
591
|
+
platform: ['tiktok']
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
routing: {
|
|
595
|
+
send: {
|
|
596
|
+
type: 'body',
|
|
597
|
+
property: 'brand_organic_toggle',
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
displayName: 'TikTok Is AIGC',
|
|
603
|
+
name: 'tiktokIsAigc',
|
|
604
|
+
type: 'boolean',
|
|
605
|
+
default: false,
|
|
606
|
+
description: 'Whether to indicate if content is AI-generated for TikTok video',
|
|
607
|
+
displayOptions: {
|
|
608
|
+
show: {
|
|
609
|
+
operation: ['uploadVideo'],
|
|
610
|
+
platform: ['tiktok']
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
routing: {
|
|
614
|
+
send: {
|
|
615
|
+
type: 'body',
|
|
616
|
+
property: 'is_aigc',
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
displayName: 'Instagram Photo Media Type',
|
|
622
|
+
name: 'instagramPhotoMediaType',
|
|
623
|
+
type: 'options',
|
|
624
|
+
options: [
|
|
625
|
+
{ name: 'Image (Feed)', value: 'IMAGE' },
|
|
626
|
+
{ name: 'Stories', value: 'STORIES' },
|
|
627
|
+
],
|
|
628
|
+
default: 'IMAGE',
|
|
629
|
+
description: 'Type of media for Instagram photo upload',
|
|
630
|
+
displayOptions: {
|
|
631
|
+
show: {
|
|
632
|
+
operation: ['uploadPhotos'],
|
|
633
|
+
platform: ['instagram']
|
|
634
|
+
},
|
|
635
|
+
},
|
|
636
|
+
routing: {
|
|
637
|
+
send: {
|
|
638
|
+
type: 'body',
|
|
639
|
+
property: 'media_type',
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
displayName: 'Instagram Video Media Type',
|
|
645
|
+
name: 'instagramVideoMediaType',
|
|
646
|
+
type: 'options',
|
|
647
|
+
options: [
|
|
648
|
+
{ name: 'Reels', value: 'REELS' },
|
|
649
|
+
{ name: 'Stories', value: 'STORIES' },
|
|
650
|
+
],
|
|
651
|
+
default: 'REELS',
|
|
652
|
+
description: 'Type of media for Instagram video upload',
|
|
653
|
+
displayOptions: {
|
|
654
|
+
show: {
|
|
655
|
+
operation: ['uploadVideo'],
|
|
656
|
+
platform: ['instagram']
|
|
657
|
+
},
|
|
658
|
+
},
|
|
659
|
+
routing: {
|
|
660
|
+
send: {
|
|
661
|
+
type: 'body',
|
|
662
|
+
property: 'media_type',
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
displayName: 'Instagram Share to Feed',
|
|
668
|
+
name: 'instagramShareToFeed',
|
|
669
|
+
type: 'boolean',
|
|
670
|
+
default: true,
|
|
671
|
+
description: 'Whether to share the Instagram video (Reel/Story) to feed',
|
|
672
|
+
displayOptions: {
|
|
673
|
+
show: {
|
|
674
|
+
operation: ['uploadVideo'],
|
|
675
|
+
platform: ['instagram']
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
routing: {
|
|
679
|
+
send: {
|
|
680
|
+
type: 'body',
|
|
681
|
+
property: 'share_to_feed',
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
displayName: 'Instagram Collaborators',
|
|
687
|
+
name: 'instagramCollaborators',
|
|
688
|
+
type: 'string',
|
|
689
|
+
default: '',
|
|
690
|
+
description: 'Comma-separated list of collaborator usernames for Instagram video',
|
|
691
|
+
displayOptions: {
|
|
692
|
+
show: {
|
|
693
|
+
operation: ['uploadVideo'],
|
|
694
|
+
platform: ['instagram']
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
routing: {
|
|
698
|
+
send: {
|
|
699
|
+
type: 'body',
|
|
700
|
+
property: 'collaborators',
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
displayName: 'Instagram Cover URL',
|
|
706
|
+
name: 'instagramCoverUrl',
|
|
707
|
+
type: 'string',
|
|
708
|
+
default: '',
|
|
709
|
+
description: 'URL for custom video cover on Instagram',
|
|
710
|
+
displayOptions: {
|
|
711
|
+
show: {
|
|
712
|
+
operation: ['uploadVideo'],
|
|
713
|
+
platform: ['instagram']
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
routing: {
|
|
717
|
+
send: {
|
|
718
|
+
type: 'body',
|
|
719
|
+
property: 'cover_url',
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
displayName: 'Instagram Audio Name',
|
|
725
|
+
name: 'instagramAudioName',
|
|
726
|
+
type: 'string',
|
|
727
|
+
default: '',
|
|
728
|
+
description: 'Name of the audio track for Instagram video',
|
|
729
|
+
displayOptions: {
|
|
730
|
+
show: {
|
|
731
|
+
operation: ['uploadVideo'],
|
|
732
|
+
platform: ['instagram']
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
routing: {
|
|
736
|
+
send: {
|
|
737
|
+
type: 'body',
|
|
738
|
+
property: 'audio_name',
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
displayName: 'Instagram User Tags',
|
|
744
|
+
name: 'instagramUserTags',
|
|
745
|
+
type: 'string',
|
|
746
|
+
default: '',
|
|
747
|
+
description: 'Comma-separated list of user tags for Instagram video',
|
|
748
|
+
displayOptions: {
|
|
749
|
+
show: {
|
|
750
|
+
operation: ['uploadVideo'],
|
|
751
|
+
platform: ['instagram']
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
routing: {
|
|
755
|
+
send: {
|
|
756
|
+
type: 'body',
|
|
757
|
+
property: 'user_tags',
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
displayName: 'Instagram Location ID',
|
|
763
|
+
name: 'instagramLocationId',
|
|
764
|
+
type: 'string',
|
|
765
|
+
default: '',
|
|
766
|
+
description: 'Instagram location ID for the video',
|
|
767
|
+
displayOptions: {
|
|
768
|
+
show: {
|
|
769
|
+
operation: ['uploadVideo'],
|
|
770
|
+
platform: ['instagram']
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
routing: {
|
|
774
|
+
send: {
|
|
775
|
+
type: 'body',
|
|
776
|
+
property: 'location_id',
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
displayName: 'Instagram Thumb Offset',
|
|
782
|
+
name: 'instagramThumbOffset',
|
|
783
|
+
type: 'string',
|
|
784
|
+
default: '',
|
|
785
|
+
description: 'Timestamp offset for video thumbnail on Instagram',
|
|
786
|
+
displayOptions: {
|
|
787
|
+
show: {
|
|
788
|
+
operation: ['uploadVideo'],
|
|
789
|
+
platform: ['instagram']
|
|
790
|
+
},
|
|
791
|
+
},
|
|
792
|
+
routing: {
|
|
793
|
+
send: {
|
|
794
|
+
type: 'body',
|
|
795
|
+
property: 'thumb_offset',
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
displayName: 'YouTube Description',
|
|
801
|
+
name: 'youtubeDescription',
|
|
802
|
+
type: 'string',
|
|
803
|
+
default: '',
|
|
804
|
+
description: 'Description of the video for YouTube. If not provided, title is used.',
|
|
805
|
+
displayOptions: {
|
|
806
|
+
show: {
|
|
807
|
+
operation: ['uploadVideo'],
|
|
808
|
+
platform: ['youtube']
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
routing: {
|
|
812
|
+
send: {
|
|
813
|
+
type: 'body',
|
|
814
|
+
property: 'description',
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
displayName: 'YouTube Tags',
|
|
820
|
+
name: 'youtubeTags',
|
|
821
|
+
type: 'string',
|
|
822
|
+
default: '',
|
|
823
|
+
description: 'Comma-separated list of tags for YouTube video. These will be sent as an array.',
|
|
824
|
+
displayOptions: {
|
|
825
|
+
show: {
|
|
826
|
+
operation: ['uploadVideo'],
|
|
827
|
+
platform: ['youtube']
|
|
828
|
+
},
|
|
829
|
+
},
|
|
830
|
+
routing: {
|
|
831
|
+
send: {
|
|
832
|
+
type: 'body',
|
|
833
|
+
property: 'tags',
|
|
834
|
+
value: '={{ $value ? $value.split(",").map(tag => tag.trim()) : [] }}',
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
displayName: 'YouTube Category ID',
|
|
840
|
+
name: 'youtubeCategoryId',
|
|
841
|
+
type: 'string',
|
|
842
|
+
default: '22',
|
|
843
|
+
description: 'Video category for YouTube',
|
|
844
|
+
displayOptions: {
|
|
845
|
+
show: {
|
|
846
|
+
operation: ['uploadVideo'],
|
|
847
|
+
platform: ['youtube']
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
routing: {
|
|
851
|
+
send: {
|
|
852
|
+
type: 'body',
|
|
853
|
+
property: 'categoryId',
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
displayName: 'YouTube Privacy Status',
|
|
859
|
+
name: 'youtubePrivacyStatus',
|
|
860
|
+
type: 'options',
|
|
861
|
+
options: [
|
|
862
|
+
{ name: 'Public', value: 'public' },
|
|
863
|
+
{ name: 'Unlisted', value: 'unlisted' },
|
|
864
|
+
{ name: 'Private', value: 'private' },
|
|
865
|
+
],
|
|
866
|
+
default: 'public',
|
|
867
|
+
description: 'Privacy setting for YouTube video',
|
|
868
|
+
displayOptions: {
|
|
869
|
+
show: {
|
|
870
|
+
operation: ['uploadVideo'],
|
|
871
|
+
platform: ['youtube']
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
routing: {
|
|
875
|
+
send: {
|
|
876
|
+
type: 'body',
|
|
877
|
+
property: 'privacyStatus',
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
displayName: 'YouTube Embeddable',
|
|
883
|
+
name: 'youtubeEmbeddable',
|
|
884
|
+
type: 'boolean',
|
|
885
|
+
default: true,
|
|
886
|
+
description: 'Whether the YouTube video is embeddable',
|
|
887
|
+
displayOptions: {
|
|
888
|
+
show: {
|
|
889
|
+
operation: ['uploadVideo'],
|
|
890
|
+
platform: ['youtube']
|
|
891
|
+
},
|
|
892
|
+
},
|
|
893
|
+
routing: {
|
|
894
|
+
send: {
|
|
895
|
+
type: 'body',
|
|
896
|
+
property: 'embeddable',
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
displayName: 'YouTube License',
|
|
902
|
+
name: 'youtubeLicense',
|
|
903
|
+
type: 'options',
|
|
904
|
+
options: [
|
|
905
|
+
{ name: 'Standard YouTube License', value: 'youtube' },
|
|
906
|
+
{ name: 'Creative Commons - Attribution', value: 'creativeCommon' },
|
|
907
|
+
],
|
|
908
|
+
default: 'youtube',
|
|
909
|
+
description: 'Video license for YouTube',
|
|
910
|
+
displayOptions: {
|
|
911
|
+
show: {
|
|
912
|
+
operation: ['uploadVideo'],
|
|
913
|
+
platform: ['youtube']
|
|
914
|
+
},
|
|
915
|
+
},
|
|
916
|
+
routing: {
|
|
917
|
+
send: {
|
|
918
|
+
type: 'body',
|
|
919
|
+
property: 'license',
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
displayName: 'YouTube Public Stats Viewable',
|
|
925
|
+
name: 'youtubePublicStatsViewable',
|
|
926
|
+
type: 'boolean',
|
|
927
|
+
default: true,
|
|
928
|
+
description: 'Whether public stats are viewable for the YouTube video',
|
|
929
|
+
displayOptions: {
|
|
930
|
+
show: {
|
|
931
|
+
operation: ['uploadVideo'],
|
|
932
|
+
platform: ['youtube']
|
|
933
|
+
},
|
|
934
|
+
},
|
|
935
|
+
routing: {
|
|
936
|
+
send: {
|
|
937
|
+
type: 'body',
|
|
938
|
+
property: 'publicStatsViewable',
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
displayName: 'YouTube Made For Kids',
|
|
944
|
+
name: 'youtubeMadeForKids',
|
|
945
|
+
type: 'boolean',
|
|
946
|
+
default: false,
|
|
947
|
+
description: 'Whether the YouTube video is made for kids',
|
|
948
|
+
displayOptions: {
|
|
949
|
+
show: {
|
|
950
|
+
operation: ['uploadVideo'],
|
|
951
|
+
platform: ['youtube']
|
|
952
|
+
},
|
|
953
|
+
},
|
|
954
|
+
routing: {
|
|
955
|
+
send: {
|
|
956
|
+
type: 'body',
|
|
957
|
+
property: 'madeForKids',
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
displayName: 'Threads Description',
|
|
963
|
+
name: 'threadsDescription',
|
|
964
|
+
type: 'string',
|
|
965
|
+
default: '',
|
|
966
|
+
description: 'The user generated commentary for the post on Threads. If not provided, title is used.',
|
|
967
|
+
displayOptions: {
|
|
968
|
+
show: {
|
|
969
|
+
operation: ['uploadVideo', 'uploadText'],
|
|
970
|
+
platform: ['threads']
|
|
971
|
+
},
|
|
972
|
+
},
|
|
973
|
+
routing: {
|
|
974
|
+
send: {
|
|
975
|
+
type: 'body',
|
|
976
|
+
property: 'description',
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
displayName: 'X Tagged User IDs',
|
|
982
|
+
name: 'xTaggedUserIds',
|
|
983
|
+
type: 'string',
|
|
984
|
+
default: '',
|
|
985
|
+
description: 'Comma-separated list of user IDs to tag for X (Twitter) video/text. These will be sent as an array.',
|
|
986
|
+
displayOptions: {
|
|
987
|
+
show: {
|
|
988
|
+
operation: ['uploadVideo', 'uploadText'],
|
|
989
|
+
platform: ['x']
|
|
990
|
+
},
|
|
991
|
+
},
|
|
992
|
+
routing: {
|
|
993
|
+
send: {
|
|
994
|
+
type: 'body',
|
|
995
|
+
property: 'tagged_user_ids',
|
|
996
|
+
value: '={{ $value ? $value.split(",").map(id => id.trim()) : [] }}',
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
displayName: 'X Reply Settings',
|
|
1002
|
+
name: 'xReplySettings',
|
|
1003
|
+
type: 'options',
|
|
1004
|
+
options: [
|
|
1005
|
+
{ name: 'Following', value: 'following' },
|
|
1006
|
+
{ name: 'Mentioned Users', value: 'mentionedUsers' },
|
|
1007
|
+
{ name: 'Everyone', value: 'everyone' },
|
|
1008
|
+
],
|
|
1009
|
+
default: 'following',
|
|
1010
|
+
description: 'Who can reply to the X (Twitter) video/text post',
|
|
1011
|
+
displayOptions: {
|
|
1012
|
+
show: {
|
|
1013
|
+
operation: ['uploadVideo', 'uploadText'],
|
|
1014
|
+
platform: ['x']
|
|
1015
|
+
},
|
|
1016
|
+
},
|
|
1017
|
+
routing: {
|
|
1018
|
+
send: {
|
|
1019
|
+
type: 'body',
|
|
1020
|
+
property: 'reply_settings',
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
displayName: 'X Nullcast (Video)',
|
|
1026
|
+
name: 'xNullcastVideo',
|
|
1027
|
+
type: 'boolean',
|
|
1028
|
+
default: false,
|
|
1029
|
+
description: 'Whether to publish X (Twitter) video without broadcasting',
|
|
1030
|
+
displayOptions: {
|
|
1031
|
+
show: {
|
|
1032
|
+
operation: ['uploadVideo'],
|
|
1033
|
+
platform: ['x']
|
|
1034
|
+
},
|
|
1035
|
+
},
|
|
1036
|
+
routing: {
|
|
1037
|
+
send: {
|
|
1038
|
+
type: 'body',
|
|
1039
|
+
property: 'nullcast',
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
displayName: 'X Place ID (Video)',
|
|
1045
|
+
name: 'xPlaceIdVideo',
|
|
1046
|
+
type: 'string',
|
|
1047
|
+
default: '',
|
|
1048
|
+
description: 'Location place ID for X (Twitter) video',
|
|
1049
|
+
displayOptions: {
|
|
1050
|
+
show: {
|
|
1051
|
+
operation: ['uploadVideo'],
|
|
1052
|
+
platform: ['x']
|
|
1053
|
+
},
|
|
1054
|
+
},
|
|
1055
|
+
routing: {
|
|
1056
|
+
send: {
|
|
1057
|
+
type: 'body',
|
|
1058
|
+
property: 'place_id',
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
displayName: 'X Poll Duration (Minutes, Video)',
|
|
1064
|
+
name: 'xPollDurationVideo',
|
|
1065
|
+
type: 'number',
|
|
1066
|
+
default: 1440,
|
|
1067
|
+
description: 'Poll duration in minutes for X (Twitter) video post. Requires Poll Options.',
|
|
1068
|
+
displayOptions: {
|
|
1069
|
+
show: {
|
|
1070
|
+
operation: ['uploadVideo'],
|
|
1071
|
+
platform: ['x']
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
1074
|
+
routing: {
|
|
1075
|
+
send: {
|
|
1076
|
+
type: 'body',
|
|
1077
|
+
property: 'poll_duration',
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
displayName: 'X Poll Options (Video)',
|
|
1083
|
+
name: 'xPollOptionsVideo',
|
|
1084
|
+
type: 'string',
|
|
1085
|
+
default: '',
|
|
1086
|
+
description: 'Comma-separated list of poll options for X (Twitter) video post. These will be sent as an array.',
|
|
1087
|
+
displayOptions: {
|
|
1088
|
+
show: {
|
|
1089
|
+
operation: ['uploadVideo'],
|
|
1090
|
+
platform: ['x']
|
|
1091
|
+
},
|
|
1092
|
+
},
|
|
1093
|
+
routing: {
|
|
1094
|
+
send: {
|
|
1095
|
+
type: 'body',
|
|
1096
|
+
property: 'poll_options',
|
|
1097
|
+
value: '={{ $value ? $value.split(",").map(opt => opt.trim()) : [] }}',
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
displayName: 'X Poll Reply Settings (Video)',
|
|
1103
|
+
name: 'xPollReplySettingsVideo',
|
|
1104
|
+
type: 'options',
|
|
1105
|
+
options: [
|
|
1106
|
+
{ name: 'Following', value: 'following' },
|
|
1107
|
+
{ name: 'Mentioned Users', value: 'mentionedUsers' },
|
|
1108
|
+
{ name: 'Everyone', value: 'everyone' },
|
|
1109
|
+
],
|
|
1110
|
+
default: 'following',
|
|
1111
|
+
description: 'Who can reply to the poll in X (Twitter) video post',
|
|
1112
|
+
displayOptions: {
|
|
1113
|
+
show: {
|
|
1114
|
+
operation: ['uploadVideo'],
|
|
1115
|
+
platform: ['x']
|
|
1116
|
+
},
|
|
1117
|
+
},
|
|
1118
|
+
routing: {
|
|
1119
|
+
send: {
|
|
1120
|
+
type: 'body',
|
|
1121
|
+
property: 'poll_reply_settings',
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
displayName: 'X Post URL (Text)',
|
|
1127
|
+
name: 'xPostUrlText',
|
|
1128
|
+
type: 'string',
|
|
1129
|
+
default: '',
|
|
1130
|
+
description: 'URL to attach to the X (Twitter) text post',
|
|
1131
|
+
displayOptions: {
|
|
1132
|
+
show: {
|
|
1133
|
+
operation: ['uploadText'],
|
|
1134
|
+
platform: ['x']
|
|
1135
|
+
},
|
|
1136
|
+
},
|
|
1137
|
+
routing: {
|
|
1138
|
+
send: {
|
|
1139
|
+
type: 'body',
|
|
1140
|
+
property: 'post_url',
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
],
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
async execute() {
|
|
1148
|
+
const items = this.getInputData();
|
|
1149
|
+
const returnData = [];
|
|
1150
|
+
const length = items.length;
|
|
1151
|
+
for (let i = 0; i < length; i++) {
|
|
1152
|
+
try {
|
|
1153
|
+
const responseData = await this.helpers.requestWithAuthentication.call(this, 'uploadPostApi', {});
|
|
1154
|
+
returnData.push({ json: responseData, pairedItem: i });
|
|
1155
|
+
}
|
|
1156
|
+
catch (error) {
|
|
1157
|
+
if (this.continueOnFail()) {
|
|
1158
|
+
returnData.push({ json: { error: error.message }, pairedItem: i });
|
|
1159
|
+
continue;
|
|
1160
|
+
}
|
|
1161
|
+
if (error.context) {
|
|
1162
|
+
error.context.itemIndex = i;
|
|
1163
|
+
throw error;
|
|
1164
|
+
}
|
|
1165
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
|
|
1166
|
+
itemIndex: i,
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
return [returnData];
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
exports.UploadPost = UploadPost;
|
|
1174
|
+
//# sourceMappingURL=UploadPost.node.js.map
|