---
title: "insert at index · RUAL Documentation"
description: "Insert an element before or after another element in a list"
canonical: https://docs.rual.nl/block-types/redis/redis_list_insert
language: en
---

# insert at index

This block is part of the [`redis`](https://docs.rual.nl/block-types/redis) group and was last modified in core [`v13.0.7`](https://docs.rual.nl/core-versions/130007).

### Redis Key Selection Required

This block relies on a Redis key to perform its redis releated actions. You must manually select the Redis key you want to use in the flow in the blueprint using the Redis key selector modal. To access the modal, click the white button on the block.

Insert an element before or after another element in a list

- flow `flow`

- before or after `value` determines if the element should be added before or after the other given element.

Default `BEFORE`

- target required `value`

- element required `value` the new element to be added

- flow `flow`

- result `number`

- success `condition`

- error `value`

- key `v13.0.7` `value`

| `redis linsert` |
| --- |
| `linsert` |

A typical wiring for [insert at index](https://docs.rual.nl/block-types/redis/redis_list_insert): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `list` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `target` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `element` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the insert at index block: typical wiring for insert at index.](https://docs.rual.nl/canvas-examples/redis_list_insert.png)

### Version history

Introduced in [`v13.0.7`](https://docs.rual.nl/core-versions/130007).

### Service documentation
