FM
FlowMarket
General Automation Beginner ⚡ 5 n8n Nodes

Split in batches node noItemsLeft example

This workflow demonstrates how to use noItemsLeft to check if there are items left to be processed by the SplitInBatches node. !workflow-screenshot Function ...

🔌 Nodes & Integrations Used (1)

n8n Core Logic

📖 Implementation & Setup Guide

This workflow demonstrates how to use `noItemsLeft` to check if there are items left to be processed by the SplitInBatches node.

![workflow-screenshot](fileId:453)

**Function node:** This node generates mock data for the workflow. Replace it with the node whose data you want to split into batches.

**SplitInBatches node:** This node splits the data with the batch size equal to `1`. Based on your use-case, set the value of the ***Batch Size***.

**IF node:** This node check if all the data by the SplitInBatches are not processed or not. It uses the expression `{{$node["SplitInBatches"].context["noItemsLeft"]}}` which returns a boolean value. If there is data yet to be processed, the expression will return `false`, otherwise `true`.

**Set node:** This node prints a message `No Items Left`. Based on your use-case, connect the false output of the *IF* node to the input of the node you want to execute, after the data is processed by the *SplitInBatches* node.

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Split in batches node noItemsLeft example.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related General Automation Workflows

View All in General Automation →