Skip to main content

N8N for beginners: looping over items

Workflow preview

Workflow preview
100%
N8N for beginners: looping over items preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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:...

Best for

  • Engineering automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.noop, n8n-nodes-base.stickynote, n8n-nodes-base.splitout, n8n-nodes-base.manualtrigger, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Dominik Baranowski.

Original n8n.io source

1.1 Workflow description

Title
N8N for beginners: looping over items
Workflow name
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:

{
  "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.

1. 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 Out 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:
    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 Out → 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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Result1

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 2 - Result2

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Split Array of Strings into Array of Objects

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 7 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Result3

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 10 - Result4

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 11 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Result5

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 13 - Paste JSON into this node

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 14 - Add param1 to output5

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Add param1 to output1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Loop over Items 2

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 17 - Loop over Items 1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 18 - Add param1 to output2

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Add param1 to output3

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Add param1 to output4

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Wait one second(just for show)

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

3. Summary Table

Workflow N8N for beginners: looping over items
Complexity advanced
Nodes 21
Categories Engineering
Author Dominik Baranowski
Published 13 Feb 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2896/2896.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does N8N for beginners: looping over items do?

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:...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.