n8n-loops-official
БесплатноБез исполняемых скриптовНе проверенUse when working with multi-item data, batches, paginated APIs, rate-limited APIs, fan-out across multiple branches, anything that needs to "do this for…
от n8n-io★ 644 звезды на GitHubОб этом скилле
n8n Loops
Three meanings of "loop" map to three mechanisms:
- "Run this node for every item." Default. Most nodes loop automatically, so do nothing.
- "Run this node once with all items, not once per item." The
executeOncesetting (single boolean). - "Process items in explicit batches with control flow between iterations." The
Loop Over Itemsnode (formerlySplit In Batches).
For paginated APIs, the HTTP Request node has built-in pagination. Almost always preferable to a hand-built page-counting loop.
The model: items are an array
Data flows between nodes as an array of items, each { json: {...}, binary?: {...} }. 50 items = 50-entry array.
Default: a node runs once per item. An HTTP Request with 50 input items fires 50 requests and outputs 50 result items. This is the implicit loop most workflows rely on.
The input array is the loop. Control iteration by controlling the array.
Non-negotiable
executeOnce: true whenever a node should fire once-per-run, not once-per-item. Includes any expression aggregating across the dataset via $input.all() / $('Node').all() plus .map() / .filter() / .reduce() (without it, the aggregate computes N times for N upstream items, often producing N duplicates downstream). Also includes single notifications, aggregate writes, summary messages.
Counter-case: .all() combined with another node's .item (a per-item lookup, e.g., $('Get Tags').all().filter(tag => $('Search Posts').item.json.tag_ids.includes(tag.json.id))) is real per-item work and should keep executeOnce off. See the n8n-expressions-official skill's executeOnce section for the full distinction.
Strong defaults
- Don't build a loop when default iteration suffices. Most nodes (HTTP Request, native service nodes, Set, IF/Switch) run once per input item automatically: N items in, N runs. To make N HTTP calls or create N records, just connect the source to the node. Don't reach for
Loop Over Itemsunless you need per-iteration control. (Note:Execute Workflowis the exception. It defaults to a single all-items batch. Seen8n-subworkflows-officialformode: 'each'.) - For paginated APIs, use HTTP Request's built-in pagination. Don't reinvent with
Loop Over Items+ manual$pageCountunless the API is genuinely odd. Seereferences/HTTP_PAGINATION.md. Loop Over Itemsis for explicit batching or per-iteration control (rate limiting, per-batch error recovery, stateful chunks, polling). Seereferences/LOOP_OVER_ITEMS.md.- Per-item iteration is sequential, not parallel. Each item completes before the next starts, even on parallel looking branches. For a real concurrency pattern, see
n8n-subworkflows-official.
Decision tree: which mechanism do I need?
Need to do something for each item?
├── Default per-item iteration is enough
│ └── Just connect the node. Done.
│
├── The node should run once total, not once per item?
│ └── Set executeOnce: true on the node
│
├── Paginated API (multiple HTTP calls to fetch all pages)?
│ └── Use HTTP Request's Pagination option (see references/HTTP_PAGINATION.md)
│
├── Need explicit batching (rate limit, chunk size, per-batch error handling)?
│ └── Use Loop Over Items node (see references/LOOP_OVER_ITEMS.md)
│
└── Need to recurse / repeat with state until a condition is met?
└── Loop Over Items with Reset, OR a sub-workflow that calls itself.
Both are advanced patterns; see references/LOOP_OVER_ITEMS.md.
executeOnce: the single-fire setting
Every node's Settings tab has an Execute Once toggle. When on, the node runs once using only the first input item. In SDK code, set executeOnce: true as shown; on an existing workflow, apply it via update_workflow setNodeSettings (n8n 2.24.0+).
{
name: 'Aggregate Slack',
type: 'n8n-nodes-base.slack',
parameters: { /* ... */ },
executeOnce: true,
}
When to use it:
- Notifications and aggregate writes. A "summary message" shouldn't fire 100 times because 100 items came in.
- Counters, totals, reports. Anything computing
$input.all().lengthetc. should run once. - Expressions aggregating across the full array via
$input.all()/$('Node').all(). Otherwise the aggregate runs per upstream item. (Per-item lookups using.all()filtered by another node's.itemare the counter-case, seen8n-expressions-official.)
When NOT to use it:
- Per-item operations. One notification per item is the default and usually correct.
- HTTP requests fanning out per item. You want one call per item.
Most common mistake: forgetting executeOnce on an aggregate node, then seeing the same message fire 50 times after a fan-out.
When the implicit loop bites you
Default per-item iteration is great until it isn't. Common surprises:
A "single" config node fires per item
A Set node after a fan-out runs once per item, producing N copies of the same
Установить n8n-loops-official в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл n8n-loops-official?
Use when working with multi-item data, batches, paginated APIs, rate-limited APIs, fan-out across multiple branches, anything that needs to "do this for each", or any time the user mentions looping, iterating, batching, paging, parallelism, or "loop over items". Triggers on "loop", "iterate", "for each", "batch", "page through", "paginate", "rate limit", "process all", "fan-out", "parallel branches", "concurrency", or any node that should run once vs once-per-item.
Как установить скилл n8n-loops-official?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл n8n-loops-official запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic