> For the complete documentation index, see [llms.txt](https://docs.flexy.bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexy.bot/modules/scripting/steps/for-each-loop.md).

# For Each Loop

**Introduction**

The "For-Each Loop" step iterates over a list of items, executing a defined set of actions for each item in the list. This step is useful for automating repetitive tasks across multiple elements.

**Configuration**

* **List**: The list of items to iterate over. This parameter is required and must be of a list type.

**Subpath: Loop**

* **Item**: Within the "Loop" subpath, the `Item` variable represents the current item in the iteration. Actions within this subpath are performed on each item in the list, one at a time.

You can use the `Item` variable in subsequent steps within the loop to perform actions specific to each element in the list.
