n8n-loops

Guide looping strategy in n8n workflows with executeOnce and Loop Over Items.

421|46|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/n8n-io/skills --skill n8n-loops
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: n8n-loops
Source: https://github.com/n8n-io/skills/tree/main/skills/n8n-loops
Command: npx skills add https://github.com/n8n-io/skills --skill n8n-loops

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents incorrect looping behavior in n8n workflows, especially when mixing per-item execution, one-time aggregation, batching, and paginated API fetching.

Core Features & Use Cases

  • Execute-once vs per-item control: set executeOnce: true for aggregates, totals, summaries, and notification/writes that must happen once per run.
  • Pick the right looping mechanism: default per-item iteration vs Loop Over Items for explicit batches, rate limits, polling, and stateful chunk processing.
  • Use built-in HTTP pagination: fetch all pages with HTTP Request pagination instead of hand-rolled page loops.
  • Avoid common wiring mistakes: correct understanding of Loop Over Items outputs (done = output 0, loop = output 1), and guardrails for reset: true termination.

Quick Start

When your workflow needs to process each item and then send one final summary, keep the default per-item flow and set executeOnce: true only on the summary node.

Frequently Asked Questions about n8n-loops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I loop through batches of items in n8n without hitting API rate limits?โ–ผ

Use the Loop Over Items node in n8n for explicit batching and chunked processing to prevent rate limiting. It iterates over multi-item datasets in controlled batches, ensuring safe API interaction without exceeding request limits.

Why does my n8n summary node execute multiple times instead of once?โ–ผ

Your n8n summary node runs multiple times because it defaults to per-item iteration. Set `executeOnce: true` on the node to ensure aggregates, totals, and notification writes only happen one time per workflow run.

What is the best way to handle pagination in n8n HTTP Request nodes?โ–ผ

The best way to handle pagination in n8n is using the built-in HTTP Request node pagination feature. It automatically fetches all pages from paginated APIs, eliminating the need for hand-rolled page loops or recursive iteration patterns.

How do I wire the Loop Over Items node outputs correctly in n8n?โ–ผ

Wire the Loop Over Items node in n8n by connecting output index 0 for the done sequence and output index 1 for the loop sequence. Correctly mapping these outputs prevents workflow routing errors and ensures proper batch termination.

When should I use executeOnce vs default per-item iteration in n8n?โ–ผ

Use `executeOnce: true` in n8n for one-time aggregation, totals, and summaries. Keep the default per-item iteration when you need subsequent nodes to process each item individually across the workflow.

How do I prevent infinite reset loops in n8n workflows?โ–ผ

Prevent infinite reset loops in n8n by enforcing bounded termination constraints. Ensure your reset loop logic includes definitive exit conditions to guarantee the workflow stops processing when the loop cycle completes.