Describe the issue/error/question
I have a workflow where I am passing the input through Split in batches, and later on i have to check condition and filter into different branch where i need to process input. But a a later point i need to access the data from SplitInBatches node as the source however I think because there is if node in between the right index was not passed and i am no longer able to access right data. To Simulate the same I tried to create a dummy workflow.
What is the error message (if any)?
Please share the workflow
"meta": {
"instanceId": "e92fd3d667b8e5f1e1efc1d69eba70b044ec59dc92beae8deaaf76559757d827"
},
"nodes": [
{
"parameters": {},
"id": "def7f9a1-52e9-48cb-83a4-c7e281ca662e",
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
340,
200
]
},
{
"parameters": {
"functionCode": "return [\n {json:{\"syncappid\":1867531079,\"data\":\"a\"}},\n {json:{\"syncappid\":null,\"data\":\"b\"}},\n {json:{\"syncappid\":1867531079,\"data\":\"c\"}},\n {json:{\"syncappid\":null,\"data\":\"d\"}},\n {json:{\"syncappid\":1867531079,\"data\":\"e\"}}\n];"
},
"id": "95c3bbb9-6cf0-4a3a-8fd5-c257c96a9fa8",
"name": "init",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
560,
200
]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "eb891ef7-bcd0-4082-a6d5-a06d628f044f",
"name": "SplitInBatches",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [
760,
660
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{typeof $json[\"syncappid\"]!=\"undefined\" && $json[\"syncappid\"]!=\"\" && $json[\"syncappid\"]!=null}}",
"value2": true
}
]
}
},
"id": "a7527d70-a4a4-4346-a71b-da26ffe3801e",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
820,
200
]
},
{
"parameters": {
"mode": "wait"
},
"id": "dcfa4175-6b8c-452d-bf48-76da8af5daf3",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
1280,
200
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}",
"value2": true
}
]
}
},
"id": "4fe2ef45-ccd7-4d4f-ae43-f9326ca2b069",
"name": "IF1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1620,
740
]
},
{
"parameters": {},
"id": "925b6fc7-442c-4ad0-b738-8d67b13e2177",
"name": "NoOp",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1840,
720
]
},
{
"parameters": {
"options": {}
},
"id": "b1f38c81-63be-45ff-b8c5-d65c10c1ad05",
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1060,
60
]
},
{
"parameters": {
"options": {}
},
"id": "68ebb6c7-f470-4359-b3c3-589442f6691c",
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1060,
340
]
},
{
"parameters": {
"functionCode": "return [\n {json:{\"syncappid\":1867531079,\"data\":\"a\"}},\n {json:{\"syncappid\":null,\"data\":\"b\"}},\n {json:{\"syncappid\":1867531079,\"data\":\"c\"}},\n {json:{\"syncappid\":null,\"data\":\"d\"}},\n {json:{\"syncappid\":1867531079,\"data\":\"e\"}}\n];"
},
"id": "ae863339-401b-4ee7-ba64-862163758dfd",
"name": "init1",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
520,
660
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{typeof $json[\"syncappid\"]!=\"undefined\" && $json[\"syncappid\"]!=\"\" && $json[\"syncappid\"]!=null}}",
"value2": true
}
]
}
},
"id": "2f3cdb81-1e74-45ae-a88b-9c863154bdf0",
"name": "IF2",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
980,
660
]
},
{
"parameters": {
"mode": "wait"
},
"id": "fefde033-e84d-4d5f-bcc6-f0c8805dac65",
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
1440,
660
]
},
{
"parameters": {
"options": {}
},
"id": "5ee15383-7433-49fe-828c-60b8b0222e74",
"name": "Set2",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1220,
520
]
},
{
"parameters": {
"options": {}
},
"id": "db9310b9-8415-4b3c-a26e-7e5e77d6aca5",
"name": "Set3",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1220,
800
]
},
{
"parameters": {},
"id": "2fd2cc83-3231-418f-81c9-ed711f219472",
"name": "NoOp1",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1580,
200
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "init",
"type": "main",
"index": 0
},
{
"node": "init1",
"type": "main",
"index": 0
}
]
]
},
"init": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"SplitInBatches": {
"main": [
[
{
"node": "IF2",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
],
[
{
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "NoOp1",
"type": "main",
"index": 0
}
]
]
},
"IF1": {
"main": [
[
{
"node": "NoOp",
"type": "main",
"index": 0
}
],
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Set1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"init1": {
"main": [
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"IF2": {
"main": [
[
{
"node": "Set2",
"type": "main",
"index": 0
}
],
[
{
"node": "Set3",
"type": "main",
"index": 0
}
]
]
},
"Merge1": {
"main": [
[
{
"node": "IF1",
"type": "main",
"index": 0
}
]
]
},
"Set2": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Set3": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
}
}
}
Share the output returned by the last node
Information on your n8n setup
- n8n version: 0.193.3
- Database you’re using (default: SQLite): Postgres
- Running n8n with the execution process [own(default), main]: main
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm