---
title: Loop
description: Walk through an array one item at a time so downstream logic can repeat safely.
source: https://www.edgaze.ai/docs/builder/nodes/loop
section: builder
---
# Loop

> Walk through an array one item at a time so downstream logic can repeat safely.

## Overview

Loop takes an array and exposes each entry along with its index. Downstream blocks can run the same logic for every item in a list.

Use it for batch enrichment, list processing, or any product that applies one template across many entries.

```docsgraph
loop
```

## Ports

- **Input , Array:** Must be a real array from an upstream block.
- **Output , Current Item:** The value for this iteration.
- **Output , Current Index:** The zero-based position in the array.

## Inspector

- **Max Iterations:** Safety cap to prevent runaway loops.
- **Body Node IDs (optional):** Explicit node IDs for the loop body on newer graphs , required for per-item execution when set.
- **Result Node ID (optional):** Which body node output becomes each iteration result when body metadata is configured.

## Tips

- Confirm upstream output is actually an array before you connect Loop.
- Set a sane max iteration limit for customer-supplied lists.
- Keep the loop body simple , complex graphs inside loops are hard to debug.
- Without body metadata on new graphs, the loop may pass the array through unchanged.

## Related

- [Workflow Studio](/docs/builder/workflow-studio)
