first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled

This commit is contained in:
2026-03-17 16:22:57 +03:30
commit 3d5eaf9445
15349 changed files with 2847338 additions and 0 deletions
@@ -0,0 +1,234 @@
{
"name": "SplitinBatches Test",
"nodes": [
{
"parameters": {},
"id": "f35d9ed9-a095-4555-b445-b22ab2bd4670",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [860, 400]
},
{
"parameters": {
"data": [
{
"i": 0
},
{
"i": 1
},
{
"i": 2
},
{
"i": 3
},
{
"i": 4
},
{
"i": 5
},
{
"i": 6
},
{
"i": 7
},
{
"i": 8
},
{
"i": 9
}
]
},
"id": "3962fba9-8f67-4b16-b2a2-69fc4b374fc8",
"name": "Create Test Data",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1080, 400]
},
{
"parameters": {
"batchSize": 3,
"options": {}
},
"name": "SplitInBatches1",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [1340, 400],
"id": "02d51797-ae62-4fd6-b703-426a4b3fb951"
},
{
"parameters": {},
"id": "ceebf988-a81f-4e57-8917-f3d1af0742e0",
"name": "Do something",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [1540, 380]
},
{
"parameters": {},
"id": "82598a32-3ede-4a1b-b7ec-e5d0e39b71c7",
"name": "Done",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [1780, 620]
},
{
"parameters": {
"values": {
"string": [
{
"value": "=A-{{ $runIndex }}-{{ $itemIndex }}"
}
]
},
"options": {}
},
"id": "c05f63fd-057b-4bdc-8559-1ae5789be346",
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [1760, 380]
}
],
"pinData": {
"Done": [
{
"json": {
"i": 0,
"propertyName": "A-0-0"
}
},
{
"json": {
"i": 1,
"propertyName": "A-0-1"
}
},
{
"json": {
"i": 2,
"propertyName": "A-0-2"
}
},
{
"json": {
"i": 3,
"propertyName": "A-1-0"
}
},
{
"json": {
"i": 4,
"propertyName": "A-1-1"
}
},
{
"json": {
"i": 5,
"propertyName": "A-1-2"
}
},
{
"json": {
"i": 6,
"propertyName": "A-2-0"
}
},
{
"json": {
"i": 7,
"propertyName": "A-2-1"
}
},
{
"json": {
"i": 8,
"propertyName": "A-2-2"
}
},
{
"json": {
"i": 9,
"propertyName": "A-3-0"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Create Test Data",
"type": "main",
"index": 0
}
]
]
},
"SplitInBatches1": {
"main": [
[
{
"node": "Do something",
"type": "main",
"index": 0
}
],
[
{
"node": "Done",
"type": "main",
"index": 0
}
]
]
},
"Do something": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "SplitInBatches1",
"type": "main",
"index": 0
}
]
]
},
"Create Test Data": {
"main": [
[
{
"node": "SplitInBatches1",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "d7a267d4-df50-457d-b473-850d43e49685",
"id": "1088",
"meta": {
"instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff"
},
"tags": []
}
@@ -0,0 +1,5 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
describe('Execute SplitInBatches Node', () => {
new NodeTestHarness().setupTests();
});
@@ -0,0 +1,178 @@
{
"name": "Split in Batches Test",
"nodes": [
{
"parameters": {},
"id": "86b8149f-b0a0-489c-bb62-e59142988996",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [400, 220]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "30c5546e-bdcc-44ff-bfca-89c5fb97b678",
"name": "Split In Batches",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [1100, 220]
},
{
"parameters": {
"values": {
"string": [
{
"name": "data[0]",
"value": "n8n"
},
{
"name": "data[1]",
"value": "test"
}
]
},
"options": {}
},
"id": "92d386b8-60be-4f8b-801c-b6459ec206f7",
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [640, 220]
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"id": "74b7e63e-a9f8-4a82-9e1f-7b2429d9118d",
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [860, 220]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $node[\"Split In Batches\"].context[\"noItemsLeft\"] }}",
"value2": true
}
]
}
},
"id": "a5f68369-4e70-4f16-b260-3c8b74517993",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [1280, 220]
},
{
"parameters": {
"values": {
"string": [
{
"name": "maxRunIndex",
"value": "={{ $node[\"Split In Batches\"].context[\"maxRunIndex\"] }}"
},
{
"value": "={{ $node[\"Split In Batches\"].context[\"currentRunIndex\"] }}"
}
]
},
"options": {}
},
"id": "1f44eb0a-5fb7-43a7-8281-84a8a7ec8464",
"name": "Output",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [1480, 200]
}
],
"pinData": {
"Output": [
{
"json": {
"data": "test",
"maxRunIndex": 2,
"propertyName": 1
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Output",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "de1a454e-43e9-4c2d-b786-18da5d97940f",
"id": "389",
"meta": {
"instanceId": "REMOVED"
},
"tags": []
}
@@ -0,0 +1,178 @@
{
"name": "Split in Batches Test",
"nodes": [
{
"parameters": {},
"id": "86b8149f-b0a0-489c-bb62-e59142988996",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [400, 220]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "30c5546e-bdcc-44ff-bfca-89c5fb97b678",
"name": "Split In Batches",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [1100, 220]
},
{
"parameters": {
"values": {
"string": [
{
"name": "data[0]",
"value": "n8n"
},
{
"name": "data[1]",
"value": "test"
}
]
},
"options": {}
},
"id": "92d386b8-60be-4f8b-801c-b6459ec206f7",
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [640, 220]
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"id": "74b7e63e-a9f8-4a82-9e1f-7b2429d9118d",
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [860, 220]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $node[\"Split In Batches\"].context[\"noItemsLeft\"] }}",
"value2": true
}
]
}
},
"id": "a5f68369-4e70-4f16-b260-3c8b74517993",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [1280, 220]
},
{
"parameters": {
"values": {
"string": [
{
"name": "maxRunIndex",
"value": "={{ $node[\"Split In Batches\"].context[\"maxRunIndex\"] }}"
},
{
"value": "={{ $node[\"Split In Batches\"].context[\"currentRunIndex\"] }}"
}
]
},
"options": {}
},
"id": "1f44eb0a-5fb7-43a7-8281-84a8a7ec8464",
"name": "Output",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [1480, 200]
}
],
"pinData": {
"Output": [
{
"json": {
"data": "test",
"maxRunIndex": 2,
"propertyName": 1
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Output",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "de1a454e-43e9-4c2d-b786-18da5d97940f",
"id": "389",
"meta": {
"instanceId": "REMOVED"
},
"tags": []
}
@@ -0,0 +1,713 @@
{
"name": "My workflow 91",
"nodes": [
{
"parameters": {},
"id": "75920640-6f1e-41dc-b8c0-bc2f21c823a5",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [740, 1100]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $node[\"Split In Batches 3_2\"].context[\"noItemsLeft\"] }}",
"value2": true
}
]
}
},
"id": "ca59e1fe-83df-4cf8-9cbb-d3ea6a8a7247",
"name": "No Items Left",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [2320, 1560]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "21991c05-c919-405b-a0d7-e1dafa5a5e74",
"name": "Split In Batches 1",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [1220, 840]
},
{
"parameters": {
"batchSize": 1,
"options": {
"reset": "={{ $node[\"Split In Batches 1_2\"].context[\"done\"] }}"
}
},
"id": "3b3ecf28-b865-4995-a34d-587047b9887a",
"name": "Split In Batches 1_2",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [1840, 900]
},
{
"parameters": {
"content": "# V2 with done branch and \"done\" variable",
"height": 221.18781425126934
},
"id": "558ca8c2-1d75-44c1-81ee-8614e1bdc36a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [660, 816.8121857487308]
},
{
"parameters": {
"content": "# V2 with IF",
"height": 113.61217587373169
},
"id": "08957c26-00d4-459b-9497-7b0636086575",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [660, 1320]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $node[\"Split In Batches 2_2\"].context[\"noItemsLeft\"] }}",
"value2": true
}
]
}
},
"id": "a38109ba-672e-4bd0-ac66-e243d53d2252",
"name": "No Items Left2",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [2320, 1320]
},
{
"parameters": {
"content": "# V1 with IF",
"height": 113.61217587373169
},
"id": "d5f45e34-21f6-4dc0-bf54-2bbbea561aed",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [660, 1560]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $node[\"Split In Batches 3\"].context[\"noItemsLeft\"] }}",
"value2": true
}
]
}
},
"id": "1787b55b-4e33-4034-8043-33d21e78cd30",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [2540, 1540]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $node[\"Split In Batches 2\"].context[\"noItemsLeft\"] }}",
"value2": true
}
]
}
},
"id": "e149b5d7-7a7f-4939-88e4-789e987cf280",
"name": "IF1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [2540, 1300]
},
{
"parameters": {
"data": [
{
"key": "0"
},
{
"key": "1"
}
]
},
"id": "cf21ca09-ca2e-4334-a6ea-e7453d8598ca",
"name": "Mock Data 1",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1000, 840]
},
{
"parameters": {
"data": [
{
"key": "10"
},
{
"key": "11"
},
{
"key": "12"
},
{
"key": "13"
},
{
"key": "14"
}
]
},
"id": "2a62fdd8-5e6c-468b-88af-bddd0475ff4a",
"name": "Mock Data 1_2",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1580, 820]
},
{
"parameters": {
"data": [
{
"key": "0"
},
{
"key": "1"
}
]
},
"id": "f4b7b020-7d07-4aff-a99b-f0d6bfe656ff",
"name": "Mock Data 2",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1000, 1280]
},
{
"parameters": {
"data": [
{
"key": "10"
},
{
"key": "11"
},
{
"key": "12"
},
{
"key": "13"
},
{
"key": "14"
}
]
},
"id": "9f9e4c1f-5dfc-45f6-ac48-ccd02d42e54c",
"name": "Mock Data 2_2",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1580, 1260]
},
{
"parameters": {
"data": [
{
"key": "0"
},
{
"key": "1"
}
]
},
"id": "d20015b3-6e15-4094-bd18-c62be7fbcf9e",
"name": "Mock Data 3",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1000, 1560]
},
{
"parameters": {
"data": [
{
"key": "10"
},
{
"key": "11"
},
{
"key": "12"
},
{
"key": "13"
},
{
"key": "14"
}
]
},
"id": "9b8f1472-3913-44ae-9e8c-e8bf01d5ea3c",
"name": "Mock Data 3_2",
"type": "n8n-nodes-testing.testData",
"typeVersion": 1,
"position": [1580, 1560]
},
{
"parameters": {},
"id": "11b6d860-ce7b-4e5c-b5eb-5ec4387092c1",
"name": "Results 1",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [1400, 920]
},
{
"parameters": {},
"id": "84277fcb-2749-49f3-83f3-7132848f3a0b",
"name": "Result 2",
"type": "n8n-nodes-base.noOp",
"position": [2860, 1280],
"typeVersion": 1
},
{
"parameters": {},
"id": "fd9de431-a537-44a6-a4e2-68825768bb1d",
"name": "Result 3",
"type": "n8n-nodes-base.noOp",
"position": [2860, 1520],
"typeVersion": 1
},
{
"parameters": {},
"id": "9a62eed8-9c40-4763-92e9-9633b77a37cf",
"name": "Some Operation 1",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [2100, 880]
},
{
"parameters": {},
"id": "cb35f9e6-7379-484b-b770-5eecba535a83",
"name": "Some Operation 2",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [2100, 1320]
},
{
"parameters": {},
"id": "62a66c9d-2a66-4c77-b4a2-0db89574074d",
"name": "Some Operation 3",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [2100, 1560]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "2ac3d20c-8891-4854-bca1-188f0e9542ac",
"name": "Split In Batches 3",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [1220, 1560]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "d37b3b09-1255-486d-99ed-cffcc9f87548",
"name": "Split In Batches 2",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [1220, 1280]
},
{
"parameters": {
"batchSize": 1,
"options": {
"reset": "={{ $node[\"Split In Batches 3_2\"].context[\"noItemsLeft\"] }}"
}
},
"id": "89a74a96-e3f7-4306-b68b-fa82254ccca3",
"name": "Split In Batches 3_2",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [1840, 1560]
},
{
"parameters": {
"batchSize": 1,
"options": {
"reset": "={{ $node[\"Split In Batches 2_2\"].context[\"noItemsLeft\"] }}"
}
},
"id": "2cc3f863-e388-494f-ba9d-e18ac28df5ee",
"name": "Split In Batches 2_2",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [1840, 1340]
}
],
"pinData": {
"Results 1": [
{
"json": {
"key": "10"
}
},
{
"json": {
"key": "11"
}
},
{
"json": {
"key": "12"
}
},
{
"json": {
"key": "13"
}
},
{
"json": {
"key": "14"
}
},
{
"json": {
"key": "10"
}
},
{
"json": {
"key": "11"
}
},
{
"json": {
"key": "12"
}
},
{
"json": {
"key": "13"
}
},
{
"json": {
"key": "14"
}
}
],
"Result 3": [
{
"json": {
"key": "14"
}
}
],
"Result 2": [
{
"json": {
"key": "14"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Mock Data 1",
"type": "main",
"index": 0
},
{
"node": "Mock Data 2",
"type": "main",
"index": 0
},
{
"node": "Mock Data 3",
"type": "main",
"index": 0
}
]
]
},
"No Items Left": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches 3_2",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches 1": {
"main": [
[
{
"node": "Mock Data 1_2",
"type": "main",
"index": 0
}
],
[
{
"node": "Results 1",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches 1_2": {
"main": [
[
{
"node": "Some Operation 1",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches 1",
"type": "main",
"index": 0
}
]
]
},
"No Items Left2": {
"main": [
[
{
"node": "IF1",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches 2_2",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Result 3",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches 3",
"type": "main",
"index": 0
}
]
]
},
"IF1": {
"main": [
[
{
"node": "Result 2",
"type": "main",
"index": 0
}
],
[
{
"node": "Split In Batches 2",
"type": "main",
"index": 0
}
]
]
},
"Mock Data 1": {
"main": [
[
{
"node": "Split In Batches 1",
"type": "main",
"index": 0
}
]
]
},
"Mock Data 1_2": {
"main": [
[
{
"node": "Split In Batches 1_2",
"type": "main",
"index": 0
}
]
]
},
"Mock Data 2": {
"main": [
[
{
"node": "Split In Batches 2",
"type": "main",
"index": 0
}
]
]
},
"Mock Data 2_2": {
"main": [
[
{
"node": "Split In Batches 2_2",
"type": "main",
"index": 0
}
]
]
},
"Mock Data 3": {
"main": [
[
{
"node": "Split In Batches 3",
"type": "main",
"index": 0
}
]
]
},
"Mock Data 3_2": {
"main": [
[
{
"node": "Split In Batches 3_2",
"type": "main",
"index": 0
}
]
]
},
"Some Operation 1": {
"main": [
[
{
"node": "Split In Batches 1_2",
"type": "main",
"index": 0
}
]
]
},
"Some Operation 2": {
"main": [
[
{
"node": "No Items Left2",
"type": "main",
"index": 0
}
]
]
},
"Some Operation 3": {
"main": [
[
{
"node": "No Items Left",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches 3": {
"main": [
[
{
"node": "Mock Data 3_2",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches 2": {
"main": [
[
{
"node": "Mock Data 2_2",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches 3_2": {
"main": [
[
{
"node": "Some Operation 3",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches 2_2": {
"main": [
[
{
"node": "Some Operation 2",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "027162aa-0b6a-4cd5-9bf6-345b70c83f2d",
"id": "1124",
"meta": {
"instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff"
},
"tags": []
}