# Get List Item

**Introduction**

The "Get List Item" step retrieves a specific item from a list based on the selected mode. This step is useful for accessing elements within a list in various ways, such as retrieving the first, last, or a random item, or by a specific index.

**Configuration**

* **List**: The list from which an item will be retrieved. This parameter is required and must be of a type that supports lists.
* **Mode**: Determines how the item will be selected from the list. This parameter is required and offers the following options:
  * **First**: Retrieves the first item in the list.
  * **Last**: Retrieves the last item in the list.
  * **Random**: Retrieves a random item from the list.
  * **By index**: Retrieves an item based on a specific index.
* **Index**: Specifies the index of the item to retrieve when the "By index" mode is selected. This parameter is required only if "By index" is chosen as the mode.

**Outputs**

* **Item**: The item retrieved from the list. This output corresponds to the specific item based on the mode and index provided, and can be used in subsequent steps of the automation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexy.bot/modules/lists/steps/get-list-item.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
