n8n Workflow

Split In Batches Node Noitemsleft Example

This n8n workflow automates tasks and integrates with various services. Split In Batches Node Noitemsleft Example - ready to import and run in your n8n instance.

n8n workflow.json

About This Script

This n8n workflow automates tasks and integrates with various services. Split In Batches Node Noitemsleft Example - ready to import and run in your n8n instance.
Features:
  • Custom JavaScript function processing
  • Conditional logic and branching
Source Code
{
    "nodes": [
        {
            "name": "On clicking 'execute'",
            "type": "n8n-nodes-base.manualTrigger",
            "position": [
                430,
                310
            ],
            "parameters": [],
            "typeVersion": 1,
            "id": "2f7b9562-a87e-4901-bdf4-12ffdcf99556"
        },
        {
            "name": "Function",
            "type": "n8n-nodes-base.function",
            "position": [
                630,
                310
            ],
            "parameters": {
                "functionCode": "const newItems = [];\n\nfor (let i=0;i<10;i++) {\n  newItems.push({json:{i}});\n}\n\nreturn newItems;"
            },
            "typeVersion": 1,
            "id": "c65e20f0-fcc0-4c83-a497-7919aef82a5b"
        },
        {
            "name": "SplitInBatches",
            "type": "n8n-nodes-base.splitInBatches",
            "position": [
                830,
                310
            ],
            "parameters": {
                "options": [],
                "batchSize": 1
            },
            "typeVersion": 1,
            "id": "0dcd4aa2-11db-4c8a-ade7-a3124307ac45"
        },
        {
            "name": "IF",
            "type": "n8n-nodes-base.if",
            "position": [
                1030,
                460
            ],
            "parameters": {
                "conditions": {
                    "boolean": [
                        {
                            "value1": true,
                            "value2": "={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}"
                        }
                    ]
                }
            },
            "typeVersion": 1,
            "id": "d7d1357e-46b4-4306-9c18-85aa3ddeb62a"
        },
        {
            "name": "Set",
            "type": "n8n-nodes-base.set",
            "position": [
                1230,
                360
            ],
            "parameters": {
                "values": {
                    "string": [
                        {
                            "name": "Message",
                            "value": "No Items Left"
                        }
                    ]
                },
                "options": [],
                "keepOnlySet": true
            },
            "typeVersion": 1,
            "id": "b6afd0b4-0700-40f8-ab0a-7b7c6cccfa8c"
        }
    ],
    "connections": {
        "IF": {
            "main": [
                [
                    {
                        "node": "Set",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "SplitInBatches",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Function": {
            "main": [
                [
                    {
                        "node": "SplitInBatches",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "SplitInBatches": {
            "main": [
                [
                    {
                        "node": "IF",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "On clicking 'execute'": {
            "main": [
                [
                    {
                        "node": "Function",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n #automation #workflow
Quick Actions
More in n8n Workflows