@sendpulse/n8n-nodes-sendpulse 0.0.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 +21 -0
- package/README.md +820 -0
- package/dist/credentials/SendPulseApi.credentials.d.ts +10 -0
- package/dist/credentials/SendPulseApi.credentials.js +37 -0
- package/dist/credentials/SendPulseApi.credentials.js.map +1 -0
- package/dist/credentials/SendPulseOAuth2Api.credentials.d.ts +10 -0
- package/dist/credentials/SendPulseOAuth2Api.credentials.js +62 -0
- package/dist/credentials/SendPulseOAuth2Api.credentials.js.map +1 -0
- package/dist/icons/sendpulse.dark.svg +4 -0
- package/dist/icons/sendpulse.svg +4 -0
- package/dist/images/mailing-list-operation.png +0 -0
- package/dist/images/node.png +0 -0
- package/dist/images/workflow1.png +0 -0
- package/dist/images/workflow2.png +0 -0
- package/dist/images/workflow3.png +0 -0
- package/dist/nodes/SendPulseA360/SendPulseA360.node.d.ts +4 -0
- package/dist/nodes/SendPulseA360/SendPulseA360.node.js +174 -0
- package/dist/nodes/SendPulseA360/SendPulseA360.node.js.map +1 -0
- package/dist/nodes/SendPulseA360/SendPulseA360.node.json +25 -0
- package/dist/nodes/SendPulseA360/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseChatbots/SendPulseChatbots.node.d.ts +4 -0
- package/dist/nodes/SendPulseChatbots/SendPulseChatbots.node.js +489 -0
- package/dist/nodes/SendPulseChatbots/SendPulseChatbots.node.js.map +1 -0
- package/dist/nodes/SendPulseChatbots/SendPulseChatbots.node.json +25 -0
- package/dist/nodes/SendPulseChatbots/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseChatbots/shared/utils.d.ts +5 -0
- package/dist/nodes/SendPulseChatbots/shared/utils.js +45 -0
- package/dist/nodes/SendPulseChatbots/shared/utils.js.map +1 -0
- package/dist/nodes/SendPulseCrm/SendPulseCrm.node.d.ts +4 -0
- package/dist/nodes/SendPulseCrm/SendPulseCrm.node.js +1750 -0
- package/dist/nodes/SendPulseCrm/SendPulseCrm.node.js.map +1 -0
- package/dist/nodes/SendPulseCrm/SendPulseCrm.node.json +25 -0
- package/dist/nodes/SendPulseCrm/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseEmail/SendPulseEmail.node.d.ts +4 -0
- package/dist/nodes/SendPulseEmail/SendPulseEmail.node.js +992 -0
- package/dist/nodes/SendPulseEmail/SendPulseEmail.node.js.map +1 -0
- package/dist/nodes/SendPulseEmail/SendPulseEmail.node.json +25 -0
- package/dist/nodes/SendPulseEmail/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseFileManager/SendPulseFileManager.node.d.ts +4 -0
- package/dist/nodes/SendPulseFileManager/SendPulseFileManager.node.js +234 -0
- package/dist/nodes/SendPulseFileManager/SendPulseFileManager.node.js.map +1 -0
- package/dist/nodes/SendPulseFileManager/SendPulseFileManager.node.json +25 -0
- package/dist/nodes/SendPulseFileManager/sendpulse.svg +4 -0
- package/dist/nodes/SendPulsePopUps/SendPulsePopUps.node.d.ts +4 -0
- package/dist/nodes/SendPulsePopUps/SendPulsePopUps.node.js +196 -0
- package/dist/nodes/SendPulsePopUps/SendPulsePopUps.node.js.map +1 -0
- package/dist/nodes/SendPulsePopUps/SendPulsePopUps.node.json +25 -0
- package/dist/nodes/SendPulsePopUps/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseSms/SendPulseSms.node.d.ts +4 -0
- package/dist/nodes/SendPulseSms/SendPulseSms.node.js +347 -0
- package/dist/nodes/SendPulseSms/SendPulseSms.node.js.map +1 -0
- package/dist/nodes/SendPulseSms/SendPulseSms.node.json +25 -0
- package/dist/nodes/SendPulseSms/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseSmtp/SendPulseSmtp.node.d.ts +4 -0
- package/dist/nodes/SendPulseSmtp/SendPulseSmtp.node.js +644 -0
- package/dist/nodes/SendPulseSmtp/SendPulseSmtp.node.js.map +1 -0
- package/dist/nodes/SendPulseSmtp/SendPulseSmtp.node.json +25 -0
- package/dist/nodes/SendPulseSmtp/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseVerifier/SendPulseVerifier.node.d.ts +4 -0
- package/dist/nodes/SendPulseVerifier/SendPulseVerifier.node.js +195 -0
- package/dist/nodes/SendPulseVerifier/SendPulseVerifier.node.js.map +1 -0
- package/dist/nodes/SendPulseVerifier/SendPulseVerifier.node.json +25 -0
- package/dist/nodes/SendPulseVerifier/sendpulse.svg +4 -0
- package/dist/nodes/SendPulseWebPush/SendPulseWebPush.node.d.ts +4 -0
- package/dist/nodes/SendPulseWebPush/SendPulseWebPush.node.js +697 -0
- package/dist/nodes/SendPulseWebPush/SendPulseWebPush.node.js.map +1 -0
- package/dist/nodes/SendPulseWebPush/SendPulseWebPush.node.json +25 -0
- package/dist/nodes/SendPulseWebPush/sendpulse.svg +4 -0
- package/dist/package.json +67 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,992 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SendPulseEmail = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const emailsFieldDefaultValue = `[
|
|
6
|
+
{
|
|
7
|
+
"email": ""
|
|
8
|
+
}
|
|
9
|
+
]`;
|
|
10
|
+
class SendPulseEmail {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.description = {
|
|
13
|
+
displayName: 'SendPulse Email',
|
|
14
|
+
name: 'sendPulseEmail',
|
|
15
|
+
icon: 'file:sendpulse.svg',
|
|
16
|
+
group: ['transform'],
|
|
17
|
+
version: 1,
|
|
18
|
+
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
19
|
+
description: 'Interact with SendPulse API',
|
|
20
|
+
defaults: {
|
|
21
|
+
name: 'SendPulse Email',
|
|
22
|
+
},
|
|
23
|
+
usableAsTool: true,
|
|
24
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
25
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
26
|
+
credentials: [
|
|
27
|
+
{
|
|
28
|
+
name: 'sendPulseApi',
|
|
29
|
+
required: false,
|
|
30
|
+
displayOptions: {
|
|
31
|
+
show: {
|
|
32
|
+
authentication: ['accessToken'],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'sendPulseOAuth2Api',
|
|
38
|
+
required: false,
|
|
39
|
+
displayOptions: {
|
|
40
|
+
show: {
|
|
41
|
+
authentication: ['oAuth2'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
requestDefaults: {
|
|
47
|
+
baseURL: 'https://api.sendpulse.com',
|
|
48
|
+
headers: {
|
|
49
|
+
Accept: 'application/json',
|
|
50
|
+
'Content-Type': 'application/json',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
properties: [
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Authentication',
|
|
56
|
+
name: 'authentication',
|
|
57
|
+
type: 'options',
|
|
58
|
+
options: [
|
|
59
|
+
{
|
|
60
|
+
name: 'Client ID & Client Secret',
|
|
61
|
+
value: 'oAuth2',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Access Token',
|
|
65
|
+
value: 'accessToken',
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
default: 'oAuth2',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Resource',
|
|
72
|
+
name: 'resource',
|
|
73
|
+
type: 'options',
|
|
74
|
+
noDataExpression: true,
|
|
75
|
+
options: [
|
|
76
|
+
{
|
|
77
|
+
name: 'Mailing List',
|
|
78
|
+
value: 'mailingList',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Email',
|
|
82
|
+
value: 'email',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Campaign',
|
|
86
|
+
value: 'campaign',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
default: 'mailingList',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Operation',
|
|
93
|
+
name: 'operation',
|
|
94
|
+
type: 'options',
|
|
95
|
+
noDataExpression: true,
|
|
96
|
+
displayOptions: {
|
|
97
|
+
show: {
|
|
98
|
+
resource: ['mailingList'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
options: [
|
|
102
|
+
{
|
|
103
|
+
name: 'Get Many',
|
|
104
|
+
value: 'getMany',
|
|
105
|
+
action: 'Get many mailing lists',
|
|
106
|
+
description: 'Get many mailing lists',
|
|
107
|
+
routing: {
|
|
108
|
+
request: {
|
|
109
|
+
method: 'GET',
|
|
110
|
+
url: '=/addressbooks',
|
|
111
|
+
qs: {
|
|
112
|
+
limit: '={{ $parameter.additionalFields.limit }}',
|
|
113
|
+
offset: '={{ $parameter.additionalFields.offset }}',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Get',
|
|
120
|
+
value: 'get',
|
|
121
|
+
action: 'Get a mailing list',
|
|
122
|
+
description: 'Get a mailing list by ID',
|
|
123
|
+
routing: {
|
|
124
|
+
request: {
|
|
125
|
+
method: 'GET',
|
|
126
|
+
url: '=/addressbooks/{{ $parameter.listId }}',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'Create',
|
|
132
|
+
value: 'create',
|
|
133
|
+
action: 'Create a mailing list',
|
|
134
|
+
description: 'Create a new mailing list',
|
|
135
|
+
routing: {
|
|
136
|
+
request: {
|
|
137
|
+
method: 'POST',
|
|
138
|
+
url: '=/addressbooks',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
default: 'getMany',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: 'Operation',
|
|
147
|
+
name: 'operation',
|
|
148
|
+
type: 'options',
|
|
149
|
+
noDataExpression: true,
|
|
150
|
+
displayOptions: {
|
|
151
|
+
show: {
|
|
152
|
+
resource: ['email'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
options: [
|
|
156
|
+
{
|
|
157
|
+
name: 'Add to List',
|
|
158
|
+
value: 'addToList',
|
|
159
|
+
action: 'Add emails to list',
|
|
160
|
+
description: 'Add one or more emails to a mailing list',
|
|
161
|
+
routing: {
|
|
162
|
+
request: {
|
|
163
|
+
method: 'POST',
|
|
164
|
+
url: '=/addressbooks/{{ $parameter.listId }}/emails',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
default: 'addToList',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
displayName: 'Operation',
|
|
173
|
+
name: 'operation',
|
|
174
|
+
type: 'options',
|
|
175
|
+
noDataExpression: true,
|
|
176
|
+
displayOptions: {
|
|
177
|
+
show: {
|
|
178
|
+
resource: ['campaign'],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
options: [
|
|
182
|
+
{
|
|
183
|
+
name: 'Get Many',
|
|
184
|
+
value: 'getMany',
|
|
185
|
+
action: 'Get a list of all email campaigns',
|
|
186
|
+
description: 'Get many campaigns',
|
|
187
|
+
routing: {
|
|
188
|
+
request: {
|
|
189
|
+
method: 'GET',
|
|
190
|
+
url: '=/campaigns',
|
|
191
|
+
qs: {
|
|
192
|
+
limit: '={{ $parameter.additionalFields.limit }}',
|
|
193
|
+
offset: '={{ $parameter.additionalFields.offset }}',
|
|
194
|
+
order: '={{ $parameter.additionalFields.order }}',
|
|
195
|
+
status: '={{ $parameter.additionalFields.status }}',
|
|
196
|
+
planed: '={{ $parameter.additionalFields.planed ? 1 : 0 }}',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: 'Get',
|
|
203
|
+
value: 'get',
|
|
204
|
+
description: 'Get information about a specific campaign',
|
|
205
|
+
action: 'Get campaign info',
|
|
206
|
+
routing: {
|
|
207
|
+
request: {
|
|
208
|
+
method: 'GET',
|
|
209
|
+
url: '=/campaigns/{{ $parameter.campaignId }}',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'Create',
|
|
215
|
+
value: 'create',
|
|
216
|
+
description: 'Create a new email campaign',
|
|
217
|
+
action: 'Create email campaign',
|
|
218
|
+
routing: {
|
|
219
|
+
request: {
|
|
220
|
+
method: 'POST',
|
|
221
|
+
url: '=/campaigns',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
default: 'getMany',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
displayName: 'List ID',
|
|
230
|
+
name: 'listId',
|
|
231
|
+
type: 'string',
|
|
232
|
+
required: true,
|
|
233
|
+
displayOptions: {
|
|
234
|
+
show: {
|
|
235
|
+
resource: ['mailingList', 'email'],
|
|
236
|
+
operation: ['get', 'addToList'],
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
default: '',
|
|
240
|
+
description: 'The ID of the mailing list',
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
displayName: 'List Name',
|
|
244
|
+
name: 'bookName',
|
|
245
|
+
type: 'string',
|
|
246
|
+
required: true,
|
|
247
|
+
displayOptions: {
|
|
248
|
+
show: {
|
|
249
|
+
resource: ['mailingList'],
|
|
250
|
+
operation: ['create'],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
default: '',
|
|
254
|
+
description: 'Name of the mailing list to create',
|
|
255
|
+
routing: {
|
|
256
|
+
send: {
|
|
257
|
+
type: 'body',
|
|
258
|
+
property: 'bookName',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
displayName: 'Emails',
|
|
264
|
+
name: 'emails',
|
|
265
|
+
type: 'json',
|
|
266
|
+
required: true,
|
|
267
|
+
displayOptions: {
|
|
268
|
+
show: {
|
|
269
|
+
resource: ['email'],
|
|
270
|
+
operation: ['addToList'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
default: emailsFieldDefaultValue,
|
|
274
|
+
description: 'Array of email objects to add. Each object should have "email" (required) and optionally "variables" object.',
|
|
275
|
+
hint: 'Format: [{"email":"example1@example.com","variables":{"name":"Elizabeth","Phone":"380960000111"}},{"email":"example2@example.com"}]',
|
|
276
|
+
routing: {
|
|
277
|
+
send: {
|
|
278
|
+
type: 'body',
|
|
279
|
+
property: 'emails',
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
displayName: 'Campaign ID',
|
|
285
|
+
name: 'campaignId',
|
|
286
|
+
type: 'string',
|
|
287
|
+
required: true,
|
|
288
|
+
displayOptions: {
|
|
289
|
+
show: {
|
|
290
|
+
resource: ['campaign'],
|
|
291
|
+
operation: ['get'],
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
default: '',
|
|
295
|
+
description: 'The ID of the campaign to retrieve',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
displayName: 'Sender Name',
|
|
299
|
+
name: 'senderName',
|
|
300
|
+
type: 'string',
|
|
301
|
+
required: true,
|
|
302
|
+
displayOptions: {
|
|
303
|
+
show: {
|
|
304
|
+
resource: ['campaign'],
|
|
305
|
+
operation: ['create'],
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
default: '',
|
|
309
|
+
description: 'Name of the sender',
|
|
310
|
+
routing: {
|
|
311
|
+
send: {
|
|
312
|
+
type: 'body',
|
|
313
|
+
property: 'sender_name',
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
displayName: 'Sender Email',
|
|
319
|
+
name: 'senderEmail',
|
|
320
|
+
type: 'string',
|
|
321
|
+
required: true,
|
|
322
|
+
default: '',
|
|
323
|
+
displayOptions: {
|
|
324
|
+
show: {
|
|
325
|
+
resource: ['campaign'],
|
|
326
|
+
operation: ['create'],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
description: 'Email address of the sender',
|
|
330
|
+
routing: {
|
|
331
|
+
send: {
|
|
332
|
+
type: 'body',
|
|
333
|
+
property: 'sender_email',
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
displayName: 'Subject',
|
|
339
|
+
name: 'subject',
|
|
340
|
+
type: 'string',
|
|
341
|
+
required: true,
|
|
342
|
+
displayOptions: {
|
|
343
|
+
show: {
|
|
344
|
+
resource: ['campaign'],
|
|
345
|
+
operation: ['create'],
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
default: '',
|
|
349
|
+
description: 'Subject of the email campaign',
|
|
350
|
+
routing: {
|
|
351
|
+
send: {
|
|
352
|
+
type: 'body',
|
|
353
|
+
property: 'subject',
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
displayName: 'Use Template',
|
|
359
|
+
name: 'useTemplate',
|
|
360
|
+
type: 'boolean',
|
|
361
|
+
displayOptions: {
|
|
362
|
+
show: {
|
|
363
|
+
resource: ['campaign'],
|
|
364
|
+
operation: ['create'],
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
default: false,
|
|
368
|
+
description: 'Whether to use a pre‑saved template (template_id) or provide the body manually',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
displayName: 'Template ID',
|
|
372
|
+
name: 'templateId',
|
|
373
|
+
type: 'string',
|
|
374
|
+
displayOptions: {
|
|
375
|
+
show: {
|
|
376
|
+
resource: ['campaign'],
|
|
377
|
+
operation: ['create'],
|
|
378
|
+
useTemplate: [true],
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
default: '',
|
|
382
|
+
description: 'ID of the template in SendPulse',
|
|
383
|
+
routing: {
|
|
384
|
+
send: {
|
|
385
|
+
type: 'body',
|
|
386
|
+
property: 'template_id',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
displayName: 'HTML Body (Base64)',
|
|
392
|
+
name: 'htmlBody',
|
|
393
|
+
type: 'string',
|
|
394
|
+
typeOptions: {
|
|
395
|
+
rows: 4,
|
|
396
|
+
},
|
|
397
|
+
displayOptions: {
|
|
398
|
+
show: {
|
|
399
|
+
resource: ['campaign'],
|
|
400
|
+
operation: ['create'],
|
|
401
|
+
useTemplate: [false],
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
default: '',
|
|
405
|
+
description: 'HTML code of the template, encoded in Base64',
|
|
406
|
+
routing: {
|
|
407
|
+
send: {
|
|
408
|
+
type: 'body',
|
|
409
|
+
property: 'body',
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
displayName: 'List IDs',
|
|
415
|
+
name: 'listIds',
|
|
416
|
+
type: 'string',
|
|
417
|
+
required: true,
|
|
418
|
+
displayOptions: {
|
|
419
|
+
show: {
|
|
420
|
+
resource: ['campaign'],
|
|
421
|
+
operation: ['create'],
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
default: '',
|
|
425
|
+
description: 'ID or comma-separated IDs of mailing lists to send the campaign to',
|
|
426
|
+
routing: {
|
|
427
|
+
send: {
|
|
428
|
+
type: 'body',
|
|
429
|
+
property: 'list_id',
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
displayName: 'Campaign Name',
|
|
435
|
+
name: 'name',
|
|
436
|
+
type: 'string',
|
|
437
|
+
displayOptions: {
|
|
438
|
+
show: {
|
|
439
|
+
resource: ['campaign'],
|
|
440
|
+
operation: ['create'],
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
default: '',
|
|
444
|
+
description: 'Email campaign name',
|
|
445
|
+
routing: {
|
|
446
|
+
send: {
|
|
447
|
+
type: 'body',
|
|
448
|
+
property: 'name',
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
displayName: 'Additional Fields',
|
|
454
|
+
name: 'additionalFields',
|
|
455
|
+
type: 'collection',
|
|
456
|
+
placeholder: 'Add Field',
|
|
457
|
+
default: {},
|
|
458
|
+
displayOptions: {
|
|
459
|
+
show: {
|
|
460
|
+
resource: ['mailingList'],
|
|
461
|
+
operation: ['getMany'],
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
options: [
|
|
465
|
+
{
|
|
466
|
+
displayName: 'Limit',
|
|
467
|
+
name: 'limit',
|
|
468
|
+
type: 'number',
|
|
469
|
+
typeOptions: {
|
|
470
|
+
minValue: 1,
|
|
471
|
+
},
|
|
472
|
+
default: 50,
|
|
473
|
+
description: 'Max number of results to return',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
displayName: 'Offset',
|
|
477
|
+
name: 'offset',
|
|
478
|
+
type: 'number',
|
|
479
|
+
typeOptions: {
|
|
480
|
+
minValue: 0,
|
|
481
|
+
},
|
|
482
|
+
default: 0,
|
|
483
|
+
description: 'Number of results to skip',
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
displayName: 'Additional Fields',
|
|
489
|
+
name: 'additionalFields',
|
|
490
|
+
type: 'collection',
|
|
491
|
+
placeholder: 'Add Field',
|
|
492
|
+
default: {},
|
|
493
|
+
displayOptions: {
|
|
494
|
+
show: {
|
|
495
|
+
resource: ['email'],
|
|
496
|
+
operation: ['addToList'],
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
options: [
|
|
500
|
+
{
|
|
501
|
+
displayName: 'Confirmation',
|
|
502
|
+
name: 'confirmation',
|
|
503
|
+
type: 'options',
|
|
504
|
+
options: [
|
|
505
|
+
{
|
|
506
|
+
name: 'Force',
|
|
507
|
+
value: 'force',
|
|
508
|
+
},
|
|
509
|
+
],
|
|
510
|
+
default: 'force',
|
|
511
|
+
description: 'Confirmation mode (fixed to FORCE)',
|
|
512
|
+
routing: {
|
|
513
|
+
send: {
|
|
514
|
+
type: 'body',
|
|
515
|
+
property: 'confirmation',
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
displayName: 'Message Language',
|
|
521
|
+
name: 'messageLang',
|
|
522
|
+
type: 'options',
|
|
523
|
+
options: [
|
|
524
|
+
{
|
|
525
|
+
name: 'English',
|
|
526
|
+
value: 'en'
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
name: 'Portuguese',
|
|
530
|
+
value: 'pt'
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
name: 'Russian',
|
|
534
|
+
value: 'ru'
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
name: 'Spanish',
|
|
538
|
+
value: 'es'
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: 'Turkish',
|
|
542
|
+
value: 'tr'
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
name: 'Ukrainian',
|
|
546
|
+
value: 'ua'
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
default: 'en',
|
|
550
|
+
description: 'Language of the confirmation email',
|
|
551
|
+
routing: {
|
|
552
|
+
send: {
|
|
553
|
+
type: 'body',
|
|
554
|
+
property: 'message_lang',
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
displayName: 'Sender Email',
|
|
560
|
+
name: 'senderEmail',
|
|
561
|
+
type: 'string',
|
|
562
|
+
default: '',
|
|
563
|
+
description: "Sender's email address (must be verified in SendPulse)",
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
displayName: 'Tags',
|
|
567
|
+
name: 'tags',
|
|
568
|
+
type: 'number',
|
|
569
|
+
typeOptions: {
|
|
570
|
+
multipleValues: true,
|
|
571
|
+
},
|
|
572
|
+
default: '',
|
|
573
|
+
description: 'List of tags to assign',
|
|
574
|
+
routing: {
|
|
575
|
+
send: {
|
|
576
|
+
type: 'body',
|
|
577
|
+
property: 'tags',
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
displayName: 'Template ID',
|
|
583
|
+
name: 'templateId',
|
|
584
|
+
type: 'string',
|
|
585
|
+
default: '',
|
|
586
|
+
description: 'Confirmation email template ID',
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
displayName: 'Additional Fields',
|
|
592
|
+
name: 'additionalFields',
|
|
593
|
+
type: 'collection',
|
|
594
|
+
placeholder: 'Add Field',
|
|
595
|
+
default: {},
|
|
596
|
+
displayOptions: {
|
|
597
|
+
show: {
|
|
598
|
+
resource: ['campaign'],
|
|
599
|
+
operation: ['getMany'],
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
options: [
|
|
603
|
+
{
|
|
604
|
+
displayName: 'Limit',
|
|
605
|
+
name: 'limit',
|
|
606
|
+
type: 'number',
|
|
607
|
+
typeOptions: {
|
|
608
|
+
minValue: 1,
|
|
609
|
+
},
|
|
610
|
+
default: 50,
|
|
611
|
+
description: 'Max number of results to return',
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
displayName: 'Offset',
|
|
615
|
+
name: 'offset',
|
|
616
|
+
type: 'number',
|
|
617
|
+
typeOptions: {
|
|
618
|
+
minValue: 0,
|
|
619
|
+
},
|
|
620
|
+
default: 0,
|
|
621
|
+
description: 'Number of results to skip',
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
displayName: 'Order',
|
|
625
|
+
name: 'order',
|
|
626
|
+
type: 'options',
|
|
627
|
+
options: [
|
|
628
|
+
{
|
|
629
|
+
name: 'Ascending',
|
|
630
|
+
value: 'asc',
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: 'Descending',
|
|
634
|
+
value: 'desc',
|
|
635
|
+
},
|
|
636
|
+
],
|
|
637
|
+
default: 'asc',
|
|
638
|
+
description: 'Order of campaigns by creation date',
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
displayName: 'Planned',
|
|
642
|
+
name: 'planed',
|
|
643
|
+
type: 'boolean',
|
|
644
|
+
default: false,
|
|
645
|
+
description: 'Whether to return only scheduled campaigns',
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
displayName: 'Status',
|
|
649
|
+
name: 'status',
|
|
650
|
+
type: 'multiOptions',
|
|
651
|
+
options: [
|
|
652
|
+
{
|
|
653
|
+
name: 'New',
|
|
654
|
+
value: 0,
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
name: 'Pending (in Moderation)',
|
|
658
|
+
value: 1,
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
name: 'Sending in Progress',
|
|
662
|
+
value: 2,
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
name: 'Sent',
|
|
666
|
+
value: 3,
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: 'Test Campaign (Sent to User\'s Email Address)',
|
|
670
|
+
value: 4,
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: 'Campaign Blocked (by the Service)',
|
|
674
|
+
value: 5,
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: 'The Campaign Marked to Be Deleted',
|
|
678
|
+
value: 6,
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'Status Updating (Status 3 Will Follow)',
|
|
682
|
+
value: 7,
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
name: 'Test Campaign Sent',
|
|
686
|
+
value: 8,
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
name: 'Delivery in Progress',
|
|
690
|
+
value: 9,
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: 'The Campaign Being Processed to Be Sent Out',
|
|
694
|
+
value: 10,
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
name: 'Awaiting the User\'s Response to the Moderator\'s Query',
|
|
698
|
+
value: 11,
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
name: 'No Active Addresses',
|
|
702
|
+
value: 12,
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
name: 'Campaign Creation in Progress',
|
|
706
|
+
value: 13,
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: 'Campaign Created and Sent to the Queue',
|
|
710
|
+
value: 14,
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
name: 'Campaign Awaiting A/B Testing Results',
|
|
714
|
+
value: 15,
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'Campaign Canceled by a User',
|
|
718
|
+
value: 16,
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: 'Sending Partially',
|
|
722
|
+
value: 22,
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: 'Sent Partially',
|
|
726
|
+
value: 23,
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
name: 'Campaign Partially Sent and Blocked by Service Admin',
|
|
730
|
+
value: 25,
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
name: 'Draft',
|
|
734
|
+
value: 26,
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: 'Requires Editing',
|
|
738
|
+
value: 27,
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
name: 'Scheduled to Resend the Message to Unread',
|
|
742
|
+
value: 28,
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
name: 'Automations. Balance Exceeded',
|
|
746
|
+
value: 33,
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'Automations Draft',
|
|
750
|
+
value: 36,
|
|
751
|
+
},
|
|
752
|
+
],
|
|
753
|
+
default: [],
|
|
754
|
+
description: 'Filter campaigns by status',
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
displayName: 'Additional Fields',
|
|
760
|
+
name: 'additionalFields',
|
|
761
|
+
type: 'collection',
|
|
762
|
+
placeholder: 'Add Field',
|
|
763
|
+
default: {},
|
|
764
|
+
displayOptions: {
|
|
765
|
+
show: {
|
|
766
|
+
resource: ['campaign'],
|
|
767
|
+
operation: ['create'],
|
|
768
|
+
},
|
|
769
|
+
},
|
|
770
|
+
options: [
|
|
771
|
+
{
|
|
772
|
+
displayName: 'AMP Body (Base64)',
|
|
773
|
+
name: 'ampBody',
|
|
774
|
+
type: 'string',
|
|
775
|
+
typeOptions: {
|
|
776
|
+
rows: 4,
|
|
777
|
+
},
|
|
778
|
+
default: '',
|
|
779
|
+
description: 'AMP version of email body',
|
|
780
|
+
routing: {
|
|
781
|
+
send: {
|
|
782
|
+
type: 'body',
|
|
783
|
+
property: 'body_amp',
|
|
784
|
+
},
|
|
785
|
+
},
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
displayName: 'Attachments',
|
|
789
|
+
name: 'attachments',
|
|
790
|
+
type: 'fixedCollection',
|
|
791
|
+
typeOptions: {
|
|
792
|
+
multipleValues: true,
|
|
793
|
+
},
|
|
794
|
+
options: [
|
|
795
|
+
{
|
|
796
|
+
name: 'attachmentsList',
|
|
797
|
+
displayName: 'Attachments',
|
|
798
|
+
values: [
|
|
799
|
+
{
|
|
800
|
+
displayName: 'Filename',
|
|
801
|
+
name: 'filename',
|
|
802
|
+
type: 'string',
|
|
803
|
+
default: '',
|
|
804
|
+
placeholder: 'document.pdf',
|
|
805
|
+
description: 'Name of the attached file',
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
displayName: 'File Contents',
|
|
809
|
+
name: 'data',
|
|
810
|
+
type: 'string',
|
|
811
|
+
typeOptions: {
|
|
812
|
+
rows: 4,
|
|
813
|
+
},
|
|
814
|
+
default: '',
|
|
815
|
+
description: 'File data',
|
|
816
|
+
},
|
|
817
|
+
],
|
|
818
|
+
},
|
|
819
|
+
],
|
|
820
|
+
default: {},
|
|
821
|
+
placeholder: 'Add Attachment',
|
|
822
|
+
routing: {
|
|
823
|
+
send: {
|
|
824
|
+
type: 'body',
|
|
825
|
+
property: 'attachments',
|
|
826
|
+
value: '={{ Object.fromEntries($parameter.additionalFields.attachments?.attachmentsList?.map(a => [a.filename, a.data]) || []) }}',
|
|
827
|
+
},
|
|
828
|
+
},
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
displayName: 'Attachments Binary',
|
|
832
|
+
name: 'attachmentsBinary',
|
|
833
|
+
type: 'fixedCollection',
|
|
834
|
+
typeOptions: {
|
|
835
|
+
multipleValues: true,
|
|
836
|
+
},
|
|
837
|
+
options: [
|
|
838
|
+
{
|
|
839
|
+
name: 'attachmentsList',
|
|
840
|
+
displayName: 'Attachments',
|
|
841
|
+
values: [
|
|
842
|
+
{
|
|
843
|
+
displayName: 'Filename',
|
|
844
|
+
name: 'filename',
|
|
845
|
+
type: 'string',
|
|
846
|
+
default: '',
|
|
847
|
+
placeholder: 'document.pdf',
|
|
848
|
+
description: 'Name of the attached file',
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
displayName: 'File Contents (Base64)',
|
|
852
|
+
name: 'data',
|
|
853
|
+
type: 'string',
|
|
854
|
+
typeOptions: {
|
|
855
|
+
rows: 4,
|
|
856
|
+
},
|
|
857
|
+
default: '',
|
|
858
|
+
description: 'Base64 encoded file data',
|
|
859
|
+
},
|
|
860
|
+
],
|
|
861
|
+
},
|
|
862
|
+
],
|
|
863
|
+
default: {},
|
|
864
|
+
placeholder: 'Add Attachment',
|
|
865
|
+
description: 'Binary attachments (base64 encoded)',
|
|
866
|
+
routing: {
|
|
867
|
+
send: {
|
|
868
|
+
type: 'body',
|
|
869
|
+
property: 'attachments_binary',
|
|
870
|
+
value: '={{ Object.fromEntries($parameter.additionalFields.attachmentsBinary?.attachmentsList?.map(a => [a.filename, a.data]) || []) }}',
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
displayName: 'Is Test',
|
|
876
|
+
name: 'isTest',
|
|
877
|
+
type: 'boolean',
|
|
878
|
+
default: false,
|
|
879
|
+
description: 'Whether this is a test campaign (sends only to the sender email)',
|
|
880
|
+
routing: {
|
|
881
|
+
send: {
|
|
882
|
+
type: 'body',
|
|
883
|
+
property: 'is_test',
|
|
884
|
+
},
|
|
885
|
+
},
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
displayName: 'Segment ID',
|
|
889
|
+
name: 'segmentId',
|
|
890
|
+
type: 'string',
|
|
891
|
+
default: '',
|
|
892
|
+
description: 'Segment ID created in your account',
|
|
893
|
+
routing: {
|
|
894
|
+
send: {
|
|
895
|
+
type: 'body',
|
|
896
|
+
property: 'segment_id',
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
displayName: 'Send Date',
|
|
902
|
+
name: 'sendDate',
|
|
903
|
+
type: 'dateTime',
|
|
904
|
+
default: '',
|
|
905
|
+
description: 'Scheduled date for sending the campaign (YYYY-MM-DD HH:mm:ss)',
|
|
906
|
+
routing: {
|
|
907
|
+
send: {
|
|
908
|
+
type: 'body',
|
|
909
|
+
property: 'send_date',
|
|
910
|
+
value: '={{ $value ? $value.split(".")[0].replace("T", " ") : undefined }}',
|
|
911
|
+
},
|
|
912
|
+
},
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
displayName: 'Track Clicks',
|
|
916
|
+
name: 'trackClicks',
|
|
917
|
+
type: 'boolean',
|
|
918
|
+
default: true,
|
|
919
|
+
description: 'Whether to track link clicks',
|
|
920
|
+
routing: {
|
|
921
|
+
send: {
|
|
922
|
+
type: 'body',
|
|
923
|
+
property: 'stats.clicks',
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
displayName: 'Track Opens',
|
|
929
|
+
name: 'trackOpens',
|
|
930
|
+
type: 'boolean',
|
|
931
|
+
default: true,
|
|
932
|
+
description: 'Whether to track email opens',
|
|
933
|
+
routing: {
|
|
934
|
+
send: {
|
|
935
|
+
type: 'body',
|
|
936
|
+
property: 'stats.opens',
|
|
937
|
+
},
|
|
938
|
+
},
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
displayName: 'Type',
|
|
942
|
+
name: 'type',
|
|
943
|
+
type: 'options',
|
|
944
|
+
options: [
|
|
945
|
+
{
|
|
946
|
+
name: 'Draft',
|
|
947
|
+
value: 'draft',
|
|
948
|
+
},
|
|
949
|
+
],
|
|
950
|
+
default: 'draft',
|
|
951
|
+
description: 'Campaign type. Use "draft" to create campaign as a draft.',
|
|
952
|
+
routing: {
|
|
953
|
+
send: {
|
|
954
|
+
type: 'body',
|
|
955
|
+
property: 'type',
|
|
956
|
+
},
|
|
957
|
+
},
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
displayName: 'Use Dynamic List',
|
|
961
|
+
name: 'useDynamicList',
|
|
962
|
+
type: 'boolean',
|
|
963
|
+
default: false,
|
|
964
|
+
description: 'Whether to send the campaign with automatic updating of the mailing list (dynamic list)',
|
|
965
|
+
routing: {
|
|
966
|
+
send: {
|
|
967
|
+
type: 'body',
|
|
968
|
+
property: 'use_dynamic_list',
|
|
969
|
+
},
|
|
970
|
+
},
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
displayName: 'UTM Campaign',
|
|
974
|
+
name: 'utmCampaign',
|
|
975
|
+
type: 'string',
|
|
976
|
+
default: '',
|
|
977
|
+
description: 'Custom UTM campaign parameter for tracking',
|
|
978
|
+
routing: {
|
|
979
|
+
send: {
|
|
980
|
+
type: 'body',
|
|
981
|
+
property: 'stats.utm_campaign',
|
|
982
|
+
},
|
|
983
|
+
},
|
|
984
|
+
},
|
|
985
|
+
],
|
|
986
|
+
},
|
|
987
|
+
],
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
exports.SendPulseEmail = SendPulseEmail;
|
|
992
|
+
//# sourceMappingURL=SendPulseEmail.node.js.map
|