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

# List message metadata

> List Outlook message metadata without requesting bodies or previews.

`listMessageMetadata` lists mailbox or folder messages with minimal mail access.
Use it when routing depends on headers and state rather than message content.

## Example

```ts automations/list-unread-mail.automation.ts theme={null}
import { automation } from "automate.ax"
import { listMessageMetadata } from "automate.ax/outlook"

export default automation("List unread Outlook mail", () => {
  listMessageMetadata({
    folder: "inbox",
    filter: "isRead eq false",
    orderBy: "receivedDateTime desc",
    limit: 50,
  })
})
```

## Inputs

`folder` optionally accepts a display path, ID, or well-known name. `filter` and
`orderBy` are Microsoft Graph OData expressions. `limit` defaults to 100 and
accepts 1–10,000. `account` defaults to the project Microsoft binding.

## Output

Returns `OutlookMessage[]` without `body` or `preview`. Each record includes
`messageId`, subject, recipients, read/draft/attachment state, categories,
importance, flag, folders, conversation and internet IDs, timestamps, sender,
Focused Inbox classification, web link, and ETag when Graph supplies them.

Invalid OData expressions fail at Microsoft Graph.
