# Get Message History

**Introduction**&#x20;

This step retrieves a specified number of recent messages from a selected channel.

**Description**&#x20;

Extracts message history from a channel, with the list ordered from the oldest to the latest message. This is useful for analyzing recent conversations or retrieving a set of messages for further processing.

**Configuration**

1. **Channel**: Choose the channel from which to retrieve message history. This is a required field.
2. **Amount**: Specify the number of messages to retrieve. The range is from 1 to 500. This is a required field.

**Outputs**

* **Messages**: A list of messages from the specified channel. The messages are ordered from most recent to oldest.

**Usage**&#x20;

Ideal for scenarios where you need to review recent communications, perform moderation actions, or gather messages for data analysis or reporting.

**Permissions**

* Requires the "Read Message History" permission to access message history in the selected channel.


---

# 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/discord/steps/get-message-history.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.
