n8n-nodes-tellwing 0.1.0 → 0.1.2
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/dist/credentials/TellwingApi.credentials.d.ts +4 -1
- package/dist/credentials/TellwingApi.credentials.js +1 -1
- package/dist/credentials/tellwing.dark.svg +36 -0
- package/dist/nodes/Tellwing/Tellwing.node.js +29 -8
- package/dist/nodes/Tellwing/tellwing.dark.svg +36 -0
- package/dist/nodes/TellwingTrigger/TellwingTrigger.node.js +2 -1
- package/dist/nodes/TellwingTrigger/tellwing.dark.svg +36 -0
- package/dist/nodes/shared/GenericFunctions.d.ts +1 -1
- package/package.json +9 -1
|
@@ -7,7 +7,10 @@ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INo
|
|
|
7
7
|
export declare class TellwingApi implements ICredentialType {
|
|
8
8
|
name: string;
|
|
9
9
|
displayName: string;
|
|
10
|
-
icon:
|
|
10
|
+
icon: {
|
|
11
|
+
readonly light: "file:tellwing.svg";
|
|
12
|
+
readonly dark: "file:tellwing.dark.svg";
|
|
13
|
+
};
|
|
11
14
|
documentationUrl: string;
|
|
12
15
|
properties: INodeProperties[];
|
|
13
16
|
authenticate: IAuthenticateGeneric;
|
|
@@ -9,7 +9,7 @@ exports.TellwingApi = void 0;
|
|
|
9
9
|
class TellwingApi {
|
|
10
10
|
name = 'tellwingApi';
|
|
11
11
|
displayName = 'Tellwing API';
|
|
12
|
-
icon = 'file:tellwing.svg';
|
|
12
|
+
icon = { light: 'file:tellwing.svg', dark: 'file:tellwing.dark.svg' };
|
|
13
13
|
documentationUrl = 'https://tellwing.com/docs';
|
|
14
14
|
properties = [
|
|
15
15
|
{
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 801 633" width="801" height="633">
|
|
2
|
+
<style>
|
|
3
|
+
.s0 { fill: #b3abff }
|
|
4
|
+
.s1 { fill: #958aff }
|
|
5
|
+
.s2 { fill: #8073ff }
|
|
6
|
+
.s3 { fill: #a49bff }
|
|
7
|
+
.s4 { fill: #efce55 }
|
|
8
|
+
.s5 { fill: #e7bb31 }
|
|
9
|
+
</style>
|
|
10
|
+
<g>
|
|
11
|
+
<path class="s0" d="m728.54 15.99l-356.77 19.99-185.89 80.45-38.47 51.96 57.46 51.97 156.4-84.94 236.86-37.98z"/>
|
|
12
|
+
<path class="s0" d="m442.22 169.89l87.95 88.45 253.84 73.45-98.44-129.42z"/>
|
|
13
|
+
<path class="s0" d="m502.19 318.81l-26.48 43.97 52.46 64.46 32.98 76.95 109.93 108.43-32.48-162.39z"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<path class="s1" d="m206.37 236.35l37.98 36.98 114.93 22.98 96.94 42.98 50.96-70.96-77.45-86.94-56.46-26.99-15.49 50.97-28.99 27.48-41.97 5-41.47-23.98z"/>
|
|
17
|
+
<path class="s1" d="m510.18 280.82l3.49 24.99 115.43 110.93 124.42 71.45-79.95-169.89-143.41-42.47z"/>
|
|
18
|
+
<path class="s1" d="m403.74 462.22l-61.46 80.45-22.48 79.45h129.42z"/>
|
|
19
|
+
</g>
|
|
20
|
+
<g>
|
|
21
|
+
<path class="s2" d="m466.21 375.27l-54.96 83.95 52.97 163.4 89.44 0.99 3.5-71.45-13.99-67.46-41.48-77.45z"/>
|
|
22
|
+
<path class="s2" d="m775.02 131.92l-120.43-40.98-67.96 30.48-180.38 25.99 286.32 38.47z"/>
|
|
23
|
+
<path class="s2" d="m348.28 157.4l-83.95 48.97 35.48 16.99 19.99-4.5 23.49-20.98z"/>
|
|
24
|
+
</g>
|
|
25
|
+
<g>
|
|
26
|
+
<path class="s3" d="m267.83 350.78l132.42 57.47 46.47-52.97-112.43-48.47z"/>
|
|
27
|
+
<path class="s3" d="m251.34 367.27l58.47 57.46 32.48 87.45 47.97-66.46-1.5-26.48-57.97-30.98z"/>
|
|
28
|
+
</g>
|
|
29
|
+
<g>
|
|
30
|
+
<path fill-rule="evenodd" class="s4" d="m210.87 273.33l-113.43 50.97-32.48 38.47-16.99 48.47-31.98-60.96 6.5-67.46 44.47-65.46 67.46-34.47zm-92.45-30.49l42.48 14-14.99-25.99-29.98-7.99z"/>
|
|
31
|
+
</g>
|
|
32
|
+
<g>
|
|
33
|
+
<path class="s5" d="m306.81 300.31l-117.93-4-52.96 20.49-36.98 31.48 137.91-0.5z"/>
|
|
34
|
+
<path class="s5" d="m116.43 222.86l2 19.49 41.97 14.49-14.49-25.48z"/>
|
|
35
|
+
</g>
|
|
36
|
+
</svg>
|
|
@@ -12,7 +12,8 @@ class Tellwing {
|
|
|
12
12
|
description = {
|
|
13
13
|
displayName: 'Tellwing',
|
|
14
14
|
name: 'tellwing',
|
|
15
|
-
|
|
15
|
+
// Claro y oscuro: n8n pinta el que corresponde al tema del editor (verificación de nodos de comunidad).
|
|
16
|
+
icon: { light: 'file:tellwing.svg', dark: 'file:tellwing.dark.svg' },
|
|
16
17
|
group: ['output'],
|
|
17
18
|
version: 1,
|
|
18
19
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
@@ -21,6 +22,8 @@ class Tellwing {
|
|
|
21
22
|
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
23
|
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
23
24
|
credentials: [{ name: 'tellwingApi', required: true }],
|
|
25
|
+
// Lo puede usar un agente de IA de n8n como herramienta (lo exige el lint de verificación).
|
|
26
|
+
usableAsTool: true,
|
|
24
27
|
properties: [
|
|
25
28
|
{
|
|
26
29
|
displayName: 'Resource',
|
|
@@ -177,12 +180,26 @@ class Tellwing {
|
|
|
177
180
|
displayOptions: { show: { resource: ['message'], content: ['template'] } },
|
|
178
181
|
},
|
|
179
182
|
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
// Pares nombre/valor en vez de un JSON libre: lo recomienda la verificación de n8n y es
|
|
184
|
+
// más fácil de llenar (y de mapear con expresiones) para quien no escribe JSON.
|
|
185
|
+
displayName: 'Variables',
|
|
186
|
+
name: 'variablesUi',
|
|
187
|
+
type: 'fixedCollection',
|
|
188
|
+
typeOptions: { multipleValues: true },
|
|
189
|
+
placeholder: 'Add Variable',
|
|
190
|
+
default: {},
|
|
191
|
+
description: 'Values for the template merge fields, e.g. code = 482913',
|
|
185
192
|
displayOptions: { show: { resource: ['message'], content: ['template'] } },
|
|
193
|
+
options: [
|
|
194
|
+
{
|
|
195
|
+
displayName: 'Variable',
|
|
196
|
+
name: 'variable',
|
|
197
|
+
values: [
|
|
198
|
+
{ displayName: 'Name', name: 'name', type: 'string', default: '', description: 'Merge field name, without braces' },
|
|
199
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '' },
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
],
|
|
186
203
|
},
|
|
187
204
|
{
|
|
188
205
|
displayName: 'Subject',
|
|
@@ -350,8 +367,12 @@ async function sendMessage(i) {
|
|
|
350
367
|
});
|
|
351
368
|
if (content === 'template') {
|
|
352
369
|
body.template_id = this.getNodeParameter('templateId', i);
|
|
353
|
-
const
|
|
354
|
-
|
|
370
|
+
const pairs = (this.getNodeParameter('variablesUi', i, {}).variable ?? []);
|
|
371
|
+
const variables = {};
|
|
372
|
+
for (const { name, value } of pairs)
|
|
373
|
+
if (name && name.trim())
|
|
374
|
+
variables[name.trim()] = value ?? '';
|
|
375
|
+
if (Object.keys(variables).length)
|
|
355
376
|
body.variables = variables;
|
|
356
377
|
}
|
|
357
378
|
else {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 801 633" width="801" height="633">
|
|
2
|
+
<style>
|
|
3
|
+
.s0 { fill: #b3abff }
|
|
4
|
+
.s1 { fill: #958aff }
|
|
5
|
+
.s2 { fill: #8073ff }
|
|
6
|
+
.s3 { fill: #a49bff }
|
|
7
|
+
.s4 { fill: #efce55 }
|
|
8
|
+
.s5 { fill: #e7bb31 }
|
|
9
|
+
</style>
|
|
10
|
+
<g>
|
|
11
|
+
<path class="s0" d="m728.54 15.99l-356.77 19.99-185.89 80.45-38.47 51.96 57.46 51.97 156.4-84.94 236.86-37.98z"/>
|
|
12
|
+
<path class="s0" d="m442.22 169.89l87.95 88.45 253.84 73.45-98.44-129.42z"/>
|
|
13
|
+
<path class="s0" d="m502.19 318.81l-26.48 43.97 52.46 64.46 32.98 76.95 109.93 108.43-32.48-162.39z"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<path class="s1" d="m206.37 236.35l37.98 36.98 114.93 22.98 96.94 42.98 50.96-70.96-77.45-86.94-56.46-26.99-15.49 50.97-28.99 27.48-41.97 5-41.47-23.98z"/>
|
|
17
|
+
<path class="s1" d="m510.18 280.82l3.49 24.99 115.43 110.93 124.42 71.45-79.95-169.89-143.41-42.47z"/>
|
|
18
|
+
<path class="s1" d="m403.74 462.22l-61.46 80.45-22.48 79.45h129.42z"/>
|
|
19
|
+
</g>
|
|
20
|
+
<g>
|
|
21
|
+
<path class="s2" d="m466.21 375.27l-54.96 83.95 52.97 163.4 89.44 0.99 3.5-71.45-13.99-67.46-41.48-77.45z"/>
|
|
22
|
+
<path class="s2" d="m775.02 131.92l-120.43-40.98-67.96 30.48-180.38 25.99 286.32 38.47z"/>
|
|
23
|
+
<path class="s2" d="m348.28 157.4l-83.95 48.97 35.48 16.99 19.99-4.5 23.49-20.98z"/>
|
|
24
|
+
</g>
|
|
25
|
+
<g>
|
|
26
|
+
<path class="s3" d="m267.83 350.78l132.42 57.47 46.47-52.97-112.43-48.47z"/>
|
|
27
|
+
<path class="s3" d="m251.34 367.27l58.47 57.46 32.48 87.45 47.97-66.46-1.5-26.48-57.97-30.98z"/>
|
|
28
|
+
</g>
|
|
29
|
+
<g>
|
|
30
|
+
<path fill-rule="evenodd" class="s4" d="m210.87 273.33l-113.43 50.97-32.48 38.47-16.99 48.47-31.98-60.96 6.5-67.46 44.47-65.46 67.46-34.47zm-92.45-30.49l42.48 14-14.99-25.99-29.98-7.99z"/>
|
|
31
|
+
</g>
|
|
32
|
+
<g>
|
|
33
|
+
<path class="s5" d="m306.81 300.31l-117.93-4-52.96 20.49-36.98 31.48 137.91-0.5z"/>
|
|
34
|
+
<path class="s5" d="m116.43 222.86l2 19.49 41.97 14.49-14.49-25.48z"/>
|
|
35
|
+
</g>
|
|
36
|
+
</svg>
|
|
@@ -18,7 +18,8 @@ class TellwingTrigger {
|
|
|
18
18
|
description = {
|
|
19
19
|
displayName: 'Tellwing Trigger',
|
|
20
20
|
name: 'tellwingTrigger',
|
|
21
|
-
|
|
21
|
+
// Claro y oscuro: n8n pinta el que corresponde al tema del editor (verificación de nodos de comunidad).
|
|
22
|
+
icon: { light: 'file:tellwing.svg', dark: 'file:tellwing.dark.svg' },
|
|
22
23
|
group: ['trigger'],
|
|
23
24
|
version: 1,
|
|
24
25
|
subtitle: '={{$parameter["events"].join(", ")}}',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 801 633" width="801" height="633">
|
|
2
|
+
<style>
|
|
3
|
+
.s0 { fill: #b3abff }
|
|
4
|
+
.s1 { fill: #958aff }
|
|
5
|
+
.s2 { fill: #8073ff }
|
|
6
|
+
.s3 { fill: #a49bff }
|
|
7
|
+
.s4 { fill: #efce55 }
|
|
8
|
+
.s5 { fill: #e7bb31 }
|
|
9
|
+
</style>
|
|
10
|
+
<g>
|
|
11
|
+
<path class="s0" d="m728.54 15.99l-356.77 19.99-185.89 80.45-38.47 51.96 57.46 51.97 156.4-84.94 236.86-37.98z"/>
|
|
12
|
+
<path class="s0" d="m442.22 169.89l87.95 88.45 253.84 73.45-98.44-129.42z"/>
|
|
13
|
+
<path class="s0" d="m502.19 318.81l-26.48 43.97 52.46 64.46 32.98 76.95 109.93 108.43-32.48-162.39z"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<path class="s1" d="m206.37 236.35l37.98 36.98 114.93 22.98 96.94 42.98 50.96-70.96-77.45-86.94-56.46-26.99-15.49 50.97-28.99 27.48-41.97 5-41.47-23.98z"/>
|
|
17
|
+
<path class="s1" d="m510.18 280.82l3.49 24.99 115.43 110.93 124.42 71.45-79.95-169.89-143.41-42.47z"/>
|
|
18
|
+
<path class="s1" d="m403.74 462.22l-61.46 80.45-22.48 79.45h129.42z"/>
|
|
19
|
+
</g>
|
|
20
|
+
<g>
|
|
21
|
+
<path class="s2" d="m466.21 375.27l-54.96 83.95 52.97 163.4 89.44 0.99 3.5-71.45-13.99-67.46-41.48-77.45z"/>
|
|
22
|
+
<path class="s2" d="m775.02 131.92l-120.43-40.98-67.96 30.48-180.38 25.99 286.32 38.47z"/>
|
|
23
|
+
<path class="s2" d="m348.28 157.4l-83.95 48.97 35.48 16.99 19.99-4.5 23.49-20.98z"/>
|
|
24
|
+
</g>
|
|
25
|
+
<g>
|
|
26
|
+
<path class="s3" d="m267.83 350.78l132.42 57.47 46.47-52.97-112.43-48.47z"/>
|
|
27
|
+
<path class="s3" d="m251.34 367.27l58.47 57.46 32.48 87.45 47.97-66.46-1.5-26.48-57.97-30.98z"/>
|
|
28
|
+
</g>
|
|
29
|
+
<g>
|
|
30
|
+
<path fill-rule="evenodd" class="s4" d="m210.87 273.33l-113.43 50.97-32.48 38.47-16.99 48.47-31.98-60.96 6.5-67.46 44.47-65.46 67.46-34.47zm-92.45-30.49l42.48 14-14.99-25.99-29.98-7.99z"/>
|
|
31
|
+
</g>
|
|
32
|
+
<g>
|
|
33
|
+
<path class="s5" d="m306.81 300.31l-117.93-4-52.96 20.49-36.98 31.48 137.91-0.5z"/>
|
|
34
|
+
<path class="s5" d="m116.43 222.86l2 19.49 41.97 14.49-14.49-25.48z"/>
|
|
35
|
+
</g>
|
|
36
|
+
</svg>
|
|
@@ -20,7 +20,7 @@ type Context = IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWeb
|
|
|
20
20
|
export declare function tellwingRequest(this: Context, method: IHttpRequestMethods, path: string, body?: IDataObject, qs?: IDataObject, options?: {
|
|
21
21
|
ignoreHttpStatusErrors?: boolean;
|
|
22
22
|
returnFullResponse?: boolean;
|
|
23
|
-
}): Promise<
|
|
23
|
+
}): Promise<IDataObject>;
|
|
24
24
|
/**
|
|
25
25
|
* El texto de un error de la API (`{ error: { code, message, param } }`) para
|
|
26
26
|
* enseñárselo a la persona, con el campo que falló.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-tellwing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Tellwing for n8n: create or update subscribers, send transactional email, record events and trigger workflows from Tellwing webhooks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"homepage": "https://tellwing.com/docs",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/cvmilocrz/n8n-nodes-tellwing.git"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/cvmilocrz/n8n-nodes-tellwing/issues"
|
|
20
|
+
},
|
|
14
21
|
"author": {
|
|
15
22
|
"name": "Tellwing",
|
|
16
23
|
"email": "support@tellwing.com"
|
|
@@ -37,6 +44,7 @@
|
|
|
37
44
|
]
|
|
38
45
|
},
|
|
39
46
|
"devDependencies": {
|
|
47
|
+
"@n8n/node-cli": "^0.55.5",
|
|
40
48
|
"@types/node": "22.20.5",
|
|
41
49
|
"n8n-workflow": "2.16.0",
|
|
42
50
|
"typescript": "5.9.3"
|