---
title: "Action loop_end"
description: "Checks whether the loop is finished or the next iteration is needed."
---

# Action `loop_end`

> **System ID:** `action_loop_end`  
> Also in code: `action_loop__end` (same handler).

## Description

Placed at the end of the loop body after `loop_start`. If there are still items — returns `error` (connect back to `loop_start`). If all have been processed — `success` and clears `loop_array` / `loop_iterator` / `loop_data`. Requires no parameters.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **success** | All items processed, loop finished |
| **error** | Next iteration needed (or loop state is missing) — connect to `loop_start` |

## Parameters

No parameters.

## Configuration example

```json
{}
```

## Related docs

- [Actions reference](/en/actionjail/reference/actions-reference.md)
