fix(Merge Node): Do not error if expected key is missing

This commit is contained in:
Michael Kret
2023-04-28 19:46:59 +03:00
committed by GitHub
parent c0b1cddc91
commit d219af75cf
11 changed files with 1257 additions and 74 deletions

View File

@@ -0,0 +1,201 @@
{
"name": "do not error on missing keys",
"nodes": [
{
"parameters": {},
"id": "c7c0cf66-790a-4da7-81c8-ba9e4bbcec9a",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [720, 300]
},
{
"parameters": {
"jsCode": "return [\n {id: 1},\n {id: 2},\n {id: 3},\n {id: 4},\n];"
},
"id": "cec18624-ced0-4de1-8987-d4b184b136b9",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [1020, 200]
},
{
"parameters": {
"jsCode": "return [\n];"
},
"id": "754d549c-82ce-4625-ba2b-6f8edcbf715e",
"name": "Code1",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [1020, 400]
},
{
"parameters": {},
"id": "551ed574-607a-4d98-9b06-350df92c805e",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [1540, 200]
},
{
"parameters": {},
"id": "00e75760-d88e-413c-b276-c759db72411f",
"name": "No Operation, do nothing1",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [1540, 380]
},
{
"parameters": {
"mode": "combine",
"mergeByFields": {
"values": [
{
"field1": "idd",
"field2": "idd"
}
]
},
"options": {}
},
"id": "2d412290-4c43-40a6-be78-946602749aa1",
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"typeVersion": 2.1,
"position": [1340, 520],
"alwaysOutputData": true
},
{
"parameters": {
"mode": "combine",
"mergeByFields": {
"values": [
{
"field1": "idd",
"field2": "idd"
}
]
},
"options": {}
},
"id": "b6f05b31-3ca0-48c4-a5ec-c7f81dc7957f",
"name": "Merge2",
"type": "n8n-nodes-base.merge",
"typeVersion": 2,
"position": [1320, 160],
"continueOnFail": true
}
],
"pinData": {
"No Operation, do nothing1": [
{
"json": {}
}
],
"No Operation, do nothing": [
{
"json": {
"id": 1
}
},
{
"json": {
"id": 2
}
},
{
"json": {
"id": 3
}
},
{
"json": {
"id": 4
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
},
{
"node": "Code1",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
},
{
"node": "Merge2",
"type": "main",
"index": 0
}
]
]
},
"Code1": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
},
{
"node": "Merge2",
"type": "main",
"index": 1
}
]
]
},
"No Operation, do nothing1": {
"main": [[]]
},
"Merge1": {
"main": [
[
{
"node": "No Operation, do nothing1",
"type": "main",
"index": 0
}
]
]
},
"Merge2": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "d0ebcbdd-b57d-495e-8f84-b9500d25c384",
"id": "8",
"meta": {
"instanceId": "6ebec4953fe56f1c009e7c3b107578b375137523af057073c0b5da17350651bd"
},
"tags": []
}