> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Get conversation history

> Read a cursor-paginated page of Slack conversation messages.

`getConversationHistory` reads messages from a public channel, private channel,
DM, or group DM. Use [Get thread replies](/reference/integrations/slack/actions/get-thread-replies)
when you specifically need every reply beneath a parent.

## Example

```ts automations/read-slack-history.automation.ts theme={null}
import { automation } from "automate.ax"
import { getConversationHistory } from "automate.ax/slack"

export default automation("Read Slack history", () => {
  getConversationHistory({
    conversationId: "C01234567",
    limit: 15,
    oldest: "1700000000.000000",
  })
})
```

## Inputs

| Input            | Type                                             | Required | Default         | Description                                                                                 |
| ---------------- | ------------------------------------------------ | -------- | --------------- | ------------------------------------------------------------------------------------------- |
| `conversationId` | `string`                                         | Yes      | —               | Stable Slack conversation ID.                                                               |
| `cursor`         | `string`                                         | No       | First page      | Opaque cursor from a preceding page.                                                        |
| `limit`          | `number`                                         | No       | Slack default   | Page size from 1 to 15. Slack applies this limit to newly distributed non-Marketplace apps. |
| `oldest`         | `string`                                         | No       | Unbounded       | Only return messages after this Slack timestamp.                                            |
| `latest`         | `string`                                         | No       | Unbounded       | Only return messages before this Slack timestamp.                                           |
| `inclusive`      | `boolean`                                        | No       | Slack default   | Includes messages exactly matching `oldest` or `latest`.                                    |
| `account`        | `string \| IntegrationAccountReference<"slack">` | No       | Project default | Slack workspace binding.                                                                    |

## Output

Returns `messages: SlackMessage[]`, `hasMore: boolean`, and
`responseMetadata.nextCursor`. Each message contains `text`, `timestamp`, and
`type`, plus available author, thread, block, attachment, file, reaction, reply,
app, bot, and subtype fields.

`hasMore` describes Slack's time-window results; use `nextCursor` for cursor
pagination when present.
