n8n for Beginners: Looping Over Items
# N8N for Beginners: Looping Over Items ## Description This workflow is designed for **n8n beginners** to understand how n8n handles **looping (iteration)** over multiple items. It highlights two key behaviors: - **Built-In Looping:** By default, most n8n nodes iterate over each item in an input array. - **Explicit Looping:** The **Loop Over Items** node allows controlled iteration, enabling **custom batch processing** and multi-step workflows. This workflow demonstrates the difference between processing an **unsplit array of strings (single item)** vs. **a split array (multiple items)**. --- ## Setup ### 1. Input Data To begin, **paste the following JSON** into the **Manual Trigger** node: ```json { "urls": [ "https://www.reddit.com", "https://www.n8n.io/", "https://n8n.io/", "https://supabase.com/", "https://duckduckgo.com/" ] } ``` **Steps to Paste Data:** - **Double-click** the Manual Trigger node. - Click **Edit Output** (top-right corner). - Paste the JSON and **Save**. - The node **turns purple**, indicating that test data is pinned. ### 2. Click Test Workflow button at the bottom of the canvas --- ## Explanation of the n8n Nodes in the Workflow | Node Name | Purpose | Documentation Link | |-----------|---------|--------------------| | **[Manual Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.manualtrigger/)** | Starts the workflow manually and sends test data | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.manualtrigger/) | | **[Split In](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitin/)** | Converts an array of strings into separate JSON objects | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitin/) | | **[Loop Over Items (Loop Over Items 1)](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/)** | Demonstrates how an **unsplit** array is treated as one item | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/) | | **[Loop Over Items (Loop Over Items 2)](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/)** | Iterates over **each item separately** | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/) | | **[Wait](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/)** | Introduces a delay per iteration (set to 1 second) | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/) | | **[Code](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)** | Adds a constant parameter (`param1`) to each item | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/) | | **[NoOp (Result Nodes)](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.noop/)** | Displays output for inspection | [Docs](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.noop/) | --- ## Execution Details ### 1. How the Workflow Runs - **Manual Trigger starts execution** with the pasted JSON data. - The workflow follows **two paths**: 1. **Unsplit Array Path** - **Loop Over Items 1** - Processes the entire array as **a single item**. - **Result1 & Result5:** Show that the array was **not split**. 2. **Split Array Path** - **Split In → Loop Over Items 2** - **Splits** the array into **separate objects**. - **Result2, Result3, Result4:** Show that each item is processed **individually**. - A **Wait node (1 sec delay)** demonstrates **controlled execution**. - Code nodes modify the JSON, adding a parameter (`param1`). ### 2. What You Will See | Node | Expected Output | |------|-----------------| | **Result1 & Result5** | The entire array is processed **as one item**. | | **Result2, Result3, Result4** | The array is **split and processed** as **individual items**. | | **Wait Node** | Adds a **1-second delay per item** in **Loop Over Items 2**. | --- ## Use Cases This workflow is useful for: - **API Data Processing:** Loop through **API responses** containing arrays. - **Web Scraping:** Process **multiple URLs** individually. - **Task Automation:** Execute **a sequence of actions per item**. - **Workflow Optimization:** Control execution order, delays, and dependencies. --- ## Notes - Sticky notes are included in the workflow **for easy reference**. - The **Wait node** is **optional**—remove it for faster execution. - This template is structured for **beginners** but serves as a **building block** for more advanced automations. ---
N8N for Beginners: Looping Over Items
Description
This workflow is designed for n8n beginners to understand how n8n handles looping (iteration) over multiple items. It highlights two key behaviors:
- Built-In Looping: By default, most n8n nodes iterate over each item in an input array.
- Explicit Looping: The Loop Over Items node allows controlled iteration, enabling custom batch processing and multi-step workflows.
This workflow demonstrates the difference between processing an unsplit array of strings (single item) vs. a split array (multiple items).
Setup
1. Input Data
To begin, paste the following JSON into the Manual Trigger node:
{ "urls": [ "https://www.reddit.com", "https://www.n8n.io/", "https://n8n.io/", "https://supabase.com/", "https://duckduckgo.com/" ] }
Steps to Paste Data:
- Double-click the Manual Trigger node.
- Click Edit Output (top-right corner).
- Paste the JSON and Save.
- The node turns purple, indicating that test data is pinned.
2. Click Test Workflow button at the bottom of the canvas
Explanation of the n8n Nodes in the Workflow
| Node Name | Purpose | Documentation Link |
|---|---|---|
| Manual Trigger | Starts the workflow manually and sends test data | Docs |
| Split In | Converts an array of strings into separate JSON objects | Docs |
| Loop Over Items (Loop Over Items 1) | Demonstrates how an unsplit array is treated as one item | Docs |
| Loop Over Items (Loop Over Items 2) | Iterates over each item separately | Docs |
| Wait | Introduces a delay per iteration (set to 1 second) | Docs |
| Code | Adds a constant parameter (param1) to each item | Docs |
| NoOp (Result Nodes) | Displays output for inspection | Docs |
Execution Details
1. How the Workflow Runs
- Manual Trigger starts execution with the pasted JSON data.
- The workflow follows two paths:
- Unsplit Array Path
- Loop Over Items 1 - Processes the entire array as a single item.
- Result1 & Result5: Show that the array was not split.
- Split Array Path
- Split In → Loop Over Items 2 - Splits the array into separate objects.
- Result2, Result3, Result4: Show that each item is processed individually.
- A Wait node (1 sec delay) demonstrates controlled execution.
- Code nodes modify the JSON, adding a parameter (
param1).
- Unsplit Array Path
2. What You Will See
| Node | Expected Output |
|---|---|
| Result1 & Result5 | The entire array is processed as one item. |
| Result2, Result3, Result4 | The array is split and processed as individual items. |
| Wait Node | Adds a 1-second delay per item in Loop Over Items 2. |
Use Cases
This workflow is useful for:
- API Data Processing: Loop through API responses containing arrays.
- Web Scraping: Process multiple URLs individually.
- Task Automation: Execute a sequence of actions per item.
- Workflow Optimization: Control execution order, delays, and dependencies.
Notes
- Sticky notes are included in the workflow for easy reference.
- The Wait node is optional—remove it for faster execution.
- This template is structured for beginners but serves as a building block for more advanced automations.
New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.
Part of a bundle
n8n Starter Kit
This workflow is one of 8 in the bundle — $39.00 for all of them.
That is $4.88 each, vs $14.99 for this one alone.
View bundleSecure checkout powered by Stripe
Support
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Data & Analytics workflows
- Generate AI viral videos with VEO 3 and upload to TikTok$14.99
- Generate a daily multi-asset market report with TwelveData, Groq and Google Sheets$14.99
- Build an OpenAI RAG system with document upload, semantic search and caching$24.99
- Automate Website Content Scraping and SEO Keyword Extraction with GPT-4o-mini and Airtable$14.99
- Process Contact Form Submissions with Validation and MongoDB Storage$14.99
- Add webhook data to a Google Sheet$2.99
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.