> For the complete documentation index, see [llms.txt](https://docs.flexy.bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexy.bot/modules/discord/steps/get-message-history.md).

# 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.
