n8n-nodes-base 1.13.0 → 1.14.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/dist/build.tsbuildinfo +1 -1
- package/dist/methods/defined.json +3 -0
- package/dist/methods/referenced.json +3 -0
- package/dist/nodes/Switch/Switch.node.d.ts +3 -4
- package/dist/nodes/Switch/Switch.node.js +9 -581
- package/dist/nodes/Switch/Switch.node.js.map +1 -1
- package/dist/nodes/Switch/V1/SwitchV1.node.d.ts +6 -0
- package/dist/nodes/Switch/V1/SwitchV1.node.js +593 -0
- package/dist/nodes/Switch/V1/SwitchV1.node.js.map +1 -0
- package/dist/nodes/Switch/V2/SwitchV2.node.d.ts +11 -0
- package/dist/nodes/Switch/V2/SwitchV2.node.js +610 -0
- package/dist/nodes/Switch/V2/SwitchV2.node.js.map +1 -0
- package/dist/nodes/Switch/V2/test/switch.expression.workflow.json +168 -0
- package/dist/nodes/Switch/V2/test/switch.rules.workflow.json +184 -0
- package/dist/types/nodes.json +3 -2
- package/package.json +3 -3
- /package/dist/nodes/Switch/{test → V1/test}/switch.expression.workflow.json +0 -0
- /package/dist/nodes/Switch/{test → V1/test}/switch.rules.workflow.json +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "My workflow 109",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "7ae16f96-5c2c-44a3-9f96-167e426336f9",
|
|
7
|
+
"name": "When clicking \"Execute Workflow\"",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [
|
|
11
|
+
620,
|
|
12
|
+
720
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"parameters": {
|
|
17
|
+
"jsCode": "return [{\n \"output\": \"third\",\n \"text\": \"third output text\"\n}, {\n \"output\": \"fourth\",\n \"text\": \"fourth output text\"\n}, {\n \"output\": \"first\",\n \"text\": \"first output text\"\n}, {\n \"output\": \"second\",\n \"text\": \"second output text\"\n}]"
|
|
18
|
+
},
|
|
19
|
+
"id": "31e9aada-7aa2-4c62-8e15-0cecb91788e4",
|
|
20
|
+
"name": "Code",
|
|
21
|
+
"type": "n8n-nodes-base.code",
|
|
22
|
+
"typeVersion": 2,
|
|
23
|
+
"position": [
|
|
24
|
+
840,
|
|
25
|
+
720
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"parameters": {},
|
|
30
|
+
"id": "cf10b4c7-16a6-4c16-a17c-7b83f954f7b9",
|
|
31
|
+
"name": "No Operation, do nothing",
|
|
32
|
+
"type": "n8n-nodes-base.noOp",
|
|
33
|
+
"typeVersion": 1,
|
|
34
|
+
"position": [
|
|
35
|
+
1380,
|
|
36
|
+
560
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"parameters": {},
|
|
41
|
+
"id": "3e7e7f4a-bff9-4ce1-a5e5-58505853260f",
|
|
42
|
+
"name": "No Operation, do nothing1",
|
|
43
|
+
"type": "n8n-nodes-base.noOp",
|
|
44
|
+
"typeVersion": 1,
|
|
45
|
+
"position": [
|
|
46
|
+
1380,
|
|
47
|
+
720
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"parameters": {},
|
|
52
|
+
"id": "205f59d6-52f5-4412-9511-b680a91d0be2",
|
|
53
|
+
"name": "No Operation, do nothing2",
|
|
54
|
+
"type": "n8n-nodes-base.noOp",
|
|
55
|
+
"typeVersion": 1,
|
|
56
|
+
"position": [
|
|
57
|
+
1380,
|
|
58
|
+
880
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"parameters": {
|
|
63
|
+
"mode": "expression",
|
|
64
|
+
"output": "={{ Math.max(0, ['first', 'second', 'third'].indexOf( $json.output)) }}",
|
|
65
|
+
"outputsAmount": 3
|
|
66
|
+
},
|
|
67
|
+
"id": "9c3dc163-0103-45c2-8455-e6ab3e84679c",
|
|
68
|
+
"name": "Switch1",
|
|
69
|
+
"type": "n8n-nodes-base.switch",
|
|
70
|
+
"typeVersion": 2,
|
|
71
|
+
"position": [
|
|
72
|
+
1100,
|
|
73
|
+
720
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"pinData": {
|
|
78
|
+
"No Operation, do nothing2": [
|
|
79
|
+
{
|
|
80
|
+
"json": {
|
|
81
|
+
"output": "third",
|
|
82
|
+
"text": "third output text"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"No Operation, do nothing1": [
|
|
87
|
+
{
|
|
88
|
+
"json": {
|
|
89
|
+
"output": "second",
|
|
90
|
+
"text": "second output text"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"No Operation, do nothing": [
|
|
95
|
+
{
|
|
96
|
+
"json": {
|
|
97
|
+
"output": "fourth",
|
|
98
|
+
"text": "fourth output text"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"json": {
|
|
103
|
+
"output": "first",
|
|
104
|
+
"text": "first output text"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"connections": {
|
|
110
|
+
"When clicking \"Execute Workflow\"": {
|
|
111
|
+
"main": [
|
|
112
|
+
[
|
|
113
|
+
{
|
|
114
|
+
"node": "Code",
|
|
115
|
+
"type": "main",
|
|
116
|
+
"index": 0
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"Code": {
|
|
122
|
+
"main": [
|
|
123
|
+
[
|
|
124
|
+
{
|
|
125
|
+
"node": "Switch1",
|
|
126
|
+
"type": "main",
|
|
127
|
+
"index": 0
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"Switch1": {
|
|
133
|
+
"main": [
|
|
134
|
+
[
|
|
135
|
+
{
|
|
136
|
+
"node": "No Operation, do nothing",
|
|
137
|
+
"type": "main",
|
|
138
|
+
"index": 0
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
[
|
|
142
|
+
{
|
|
143
|
+
"node": "No Operation, do nothing1",
|
|
144
|
+
"type": "main",
|
|
145
|
+
"index": 0
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
{
|
|
150
|
+
"node": "No Operation, do nothing2",
|
|
151
|
+
"type": "main",
|
|
152
|
+
"index": 0
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"active": false,
|
|
159
|
+
"settings": {
|
|
160
|
+
"executionOrder": "v1"
|
|
161
|
+
},
|
|
162
|
+
"versionId": "cca0f0b9-d01e-435b-9125-9616007f4aea",
|
|
163
|
+
"id": "xjPY8ZYJK53G6nQ1",
|
|
164
|
+
"meta": {
|
|
165
|
+
"instanceId": "ec7a5f4ffdb34436e59d23eaccb5015b5238de2a877e205b28572bf1ffecfe04"
|
|
166
|
+
},
|
|
167
|
+
"tags": []
|
|
168
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "My workflow 109",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "7ae16f96-5c2c-44a3-9f96-167e426336f9",
|
|
7
|
+
"name": "When clicking \"Execute Workflow\"",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [
|
|
11
|
+
620,
|
|
12
|
+
720
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"parameters": {
|
|
17
|
+
"jsCode": "return [{\n \"output\": \"third\",\n \"text\": \"third output text\"\n}, {\n \"output\": \"fourth\",\n \"text\": \"fourth output text\"\n}, {\n \"output\": \"first\",\n \"text\": \"first output text\"\n}, {\n \"output\": \"second\",\n \"text\": \"second output text\"\n}]"
|
|
18
|
+
},
|
|
19
|
+
"id": "31e9aada-7aa2-4c62-8e15-0cecb91788e4",
|
|
20
|
+
"name": "Code",
|
|
21
|
+
"type": "n8n-nodes-base.code",
|
|
22
|
+
"typeVersion": 2,
|
|
23
|
+
"position": [
|
|
24
|
+
840,
|
|
25
|
+
720
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"parameters": {
|
|
30
|
+
"dataType": "string",
|
|
31
|
+
"value1": "={{ $json.output }}",
|
|
32
|
+
"rules": {
|
|
33
|
+
"rules": [
|
|
34
|
+
{
|
|
35
|
+
"value2": "first",
|
|
36
|
+
"outputKey": "First Output"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"value2": "second",
|
|
40
|
+
"outputKey": "Second Output"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"value2": "third",
|
|
44
|
+
"outputKey": "Third Output"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"fallbackOutput": 2
|
|
49
|
+
},
|
|
50
|
+
"id": "0dd6e98a-2830-42fb-9a9d-6d4ff8678cbd",
|
|
51
|
+
"name": "Switch",
|
|
52
|
+
"type": "n8n-nodes-base.switch",
|
|
53
|
+
"typeVersion": 2,
|
|
54
|
+
"position": [
|
|
55
|
+
1120,
|
|
56
|
+
720
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"parameters": {},
|
|
61
|
+
"id": "cf10b4c7-16a6-4c16-a17c-7b83f954f7b9",
|
|
62
|
+
"name": "No Operation, do nothing",
|
|
63
|
+
"type": "n8n-nodes-base.noOp",
|
|
64
|
+
"typeVersion": 1,
|
|
65
|
+
"position": [
|
|
66
|
+
1380,
|
|
67
|
+
560
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"parameters": {},
|
|
72
|
+
"id": "3e7e7f4a-bff9-4ce1-a5e5-58505853260f",
|
|
73
|
+
"name": "No Operation, do nothing1",
|
|
74
|
+
"type": "n8n-nodes-base.noOp",
|
|
75
|
+
"typeVersion": 1,
|
|
76
|
+
"position": [
|
|
77
|
+
1380,
|
|
78
|
+
720
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"parameters": {},
|
|
83
|
+
"id": "205f59d6-52f5-4412-9511-b680a91d0be2",
|
|
84
|
+
"name": "No Operation, do nothing2",
|
|
85
|
+
"type": "n8n-nodes-base.noOp",
|
|
86
|
+
"typeVersion": 1,
|
|
87
|
+
"position": [
|
|
88
|
+
1380,
|
|
89
|
+
880
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"pinData": {
|
|
94
|
+
"No Operation, do nothing": [
|
|
95
|
+
{
|
|
96
|
+
"json": {
|
|
97
|
+
"output": "first",
|
|
98
|
+
"text": "first output text"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"No Operation, do nothing1": [
|
|
103
|
+
{
|
|
104
|
+
"json": {
|
|
105
|
+
"output": "second",
|
|
106
|
+
"text": "second output text"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"No Operation, do nothing2": [
|
|
111
|
+
{
|
|
112
|
+
"json": {
|
|
113
|
+
"output": "third",
|
|
114
|
+
"text": "third output text"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"json": {
|
|
119
|
+
"output": "fourth",
|
|
120
|
+
"text": "fourth output text"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"connections": {
|
|
126
|
+
"When clicking \"Execute Workflow\"": {
|
|
127
|
+
"main": [
|
|
128
|
+
[
|
|
129
|
+
{
|
|
130
|
+
"node": "Code",
|
|
131
|
+
"type": "main",
|
|
132
|
+
"index": 0
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"Code": {
|
|
138
|
+
"main": [
|
|
139
|
+
[
|
|
140
|
+
{
|
|
141
|
+
"node": "Switch",
|
|
142
|
+
"type": "main",
|
|
143
|
+
"index": 0
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"Switch": {
|
|
149
|
+
"main": [
|
|
150
|
+
[
|
|
151
|
+
{
|
|
152
|
+
"node": "No Operation, do nothing",
|
|
153
|
+
"type": "main",
|
|
154
|
+
"index": 0
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
{
|
|
159
|
+
"node": "No Operation, do nothing1",
|
|
160
|
+
"type": "main",
|
|
161
|
+
"index": 0
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
{
|
|
166
|
+
"node": "No Operation, do nothing2",
|
|
167
|
+
"type": "main",
|
|
168
|
+
"index": 0
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"active": false,
|
|
175
|
+
"settings": {
|
|
176
|
+
"executionOrder": "v1"
|
|
177
|
+
},
|
|
178
|
+
"versionId": "627af20f-47fc-47a7-8da6-a7e7b21225df",
|
|
179
|
+
"id": "xjPY8ZYJK53G6nQ1",
|
|
180
|
+
"meta": {
|
|
181
|
+
"instanceId": "ec7a5f4ffdb34436e59d23eaccb5015b5238de2a877e205b28572bf1ffecfe04"
|
|
182
|
+
},
|
|
183
|
+
"tags": []
|
|
184
|
+
}
|