n8n-nodes-whaapy 0.1.2 → 0.2.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.
|
@@ -192,7 +192,8 @@ class Whaapy {
|
|
|
192
192
|
type: 'string',
|
|
193
193
|
required: true,
|
|
194
194
|
default: '',
|
|
195
|
-
|
|
195
|
+
placeholder: 'orden_confirmada',
|
|
196
|
+
description: 'Exact name of the WhatsApp template as it appears in Meta Business Manager',
|
|
196
197
|
displayOptions: {
|
|
197
198
|
show: { resource: ['message'], operation: ['send'], messageType: ['template'] },
|
|
198
199
|
},
|
|
@@ -200,19 +201,88 @@ class Whaapy {
|
|
|
200
201
|
send: { type: 'body', property: 'templateName' },
|
|
201
202
|
},
|
|
202
203
|
},
|
|
204
|
+
// Message: Send - Template Language
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Language',
|
|
207
|
+
name: 'templateLanguage',
|
|
208
|
+
type: 'options',
|
|
209
|
+
default: 'es_MX',
|
|
210
|
+
description: 'Template language code',
|
|
211
|
+
displayOptions: {
|
|
212
|
+
show: { resource: ['message'], operation: ['send'], messageType: ['template'] },
|
|
213
|
+
},
|
|
214
|
+
options: [
|
|
215
|
+
{ name: 'Spanish (Mexico)', value: 'es_MX' },
|
|
216
|
+
{ name: 'Spanish (Spain)', value: 'es_ES' },
|
|
217
|
+
{ name: 'Spanish (Argentina)', value: 'es_AR' },
|
|
218
|
+
{ name: 'English (US)', value: 'en_US' },
|
|
219
|
+
{ name: 'English (UK)', value: 'en_GB' },
|
|
220
|
+
{ name: 'Portuguese (Brazil)', value: 'pt_BR' },
|
|
221
|
+
{ name: 'French', value: 'fr' },
|
|
222
|
+
{ name: 'German', value: 'de' },
|
|
223
|
+
{ name: 'Italian', value: 'it' },
|
|
224
|
+
],
|
|
225
|
+
routing: {
|
|
226
|
+
send: { type: 'body', property: 'language' },
|
|
227
|
+
},
|
|
228
|
+
},
|
|
203
229
|
// Message: Send - Template parameters
|
|
204
230
|
{
|
|
205
|
-
displayName: '
|
|
231
|
+
displayName: 'Body Parameters',
|
|
206
232
|
name: 'templateParameters',
|
|
207
|
-
type: '
|
|
208
|
-
default: '
|
|
209
|
-
|
|
233
|
+
type: 'string',
|
|
234
|
+
default: '',
|
|
235
|
+
placeholder: 'Juan Pérez, #ORD-12345, $1500',
|
|
236
|
+
description: 'Comma-separated values for {{1}}, {{2}}, etc. placeholders in the template body. Example: "Juan, #12345, $100"',
|
|
210
237
|
displayOptions: {
|
|
211
238
|
show: { resource: ['message'], operation: ['send'], messageType: ['template'] },
|
|
212
239
|
},
|
|
213
240
|
routing: {
|
|
214
|
-
send: {
|
|
241
|
+
send: {
|
|
242
|
+
type: 'body',
|
|
243
|
+
property: 'template_parameters',
|
|
244
|
+
value: '={{ $value ? $value.split(",").map(v => v.trim()) : [] }}',
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
// Message: Send - Template Header Media
|
|
249
|
+
{
|
|
250
|
+
displayName: 'Header Media',
|
|
251
|
+
name: 'templateHeaderMedia',
|
|
252
|
+
type: 'collection',
|
|
253
|
+
placeholder: 'Add Header Media',
|
|
254
|
+
default: {},
|
|
255
|
+
description: 'Optional media for template header (image, video, or document)',
|
|
256
|
+
displayOptions: {
|
|
257
|
+
show: { resource: ['message'], operation: ['send'], messageType: ['template'] },
|
|
215
258
|
},
|
|
259
|
+
options: [
|
|
260
|
+
{
|
|
261
|
+
displayName: 'Media Type',
|
|
262
|
+
name: 'type',
|
|
263
|
+
type: 'options',
|
|
264
|
+
default: 'image',
|
|
265
|
+
options: [
|
|
266
|
+
{ name: 'Image', value: 'image' },
|
|
267
|
+
{ name: 'Video', value: 'video' },
|
|
268
|
+
{ name: 'Document', value: 'document' },
|
|
269
|
+
],
|
|
270
|
+
routing: {
|
|
271
|
+
send: { type: 'body', property: 'header_media.type' },
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
displayName: 'Media URL',
|
|
276
|
+
name: 'url',
|
|
277
|
+
type: 'string',
|
|
278
|
+
default: '',
|
|
279
|
+
placeholder: 'https://example.com/image.jpg',
|
|
280
|
+
description: 'Public URL of the media file',
|
|
281
|
+
routing: {
|
|
282
|
+
send: { type: 'body', property: 'header_media.url' },
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
],
|
|
216
286
|
},
|
|
217
287
|
// Message: Send - Interactive content
|
|
218
288
|
{
|
|
@@ -270,12 +340,30 @@ class Whaapy {
|
|
|
270
340
|
},
|
|
271
341
|
// Message: Send - Contacts
|
|
272
342
|
{
|
|
273
|
-
displayName: 'Contacts
|
|
343
|
+
displayName: 'Contacts',
|
|
274
344
|
name: 'contactsData',
|
|
275
345
|
type: 'json',
|
|
276
346
|
required: true,
|
|
277
|
-
default:
|
|
278
|
-
|
|
347
|
+
default: `[
|
|
348
|
+
{
|
|
349
|
+
"name": {
|
|
350
|
+
"formatted_name": "Juan Pérez",
|
|
351
|
+
"first_name": "Juan",
|
|
352
|
+
"last_name": "Pérez"
|
|
353
|
+
},
|
|
354
|
+
"phones": [
|
|
355
|
+
{ "phone": "+5215512345678", "type": "WORK" }
|
|
356
|
+
],
|
|
357
|
+
"emails": [
|
|
358
|
+
{ "email": "juan@empresa.com", "type": "WORK" }
|
|
359
|
+
],
|
|
360
|
+
"org": {
|
|
361
|
+
"company": "Empresa SA",
|
|
362
|
+
"title": "Director"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
]`,
|
|
366
|
+
description: 'Array of contact cards to send. Each contact needs: name.formatted_name (required), phones[].phone (required). Optional: emails, org, addresses.',
|
|
279
367
|
displayOptions: {
|
|
280
368
|
show: { resource: ['message'], operation: ['send'], messageType: ['contacts'] },
|
|
281
369
|
},
|