---
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 the scenario: `loop__end`  
> Alias of the same logic: [`loop_end`](/en/actionjail/reference/actions/loop_end.md) (`action_loop_end`).

## Description

Placed at the end of the loop body after [`loop__start`](/en/actionjail/reference/actions/loop__start.md). 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)
- [Action loop__start](/en/actionjail/reference/actions/loop__start.md)
- [Action loop_end](/en/actionjail/reference/actions/loop_end.md)
