> ## 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 mail folders

> List top-level or child Outlook mail folders and message counts.

`listMailFolders` lists either the mailbox's top-level folders or the direct
children of a selected folder.

## Example

```ts automations/list-outlook-folders.automation.ts theme={null}
import { automation } from "automate.ax"
import { listMailFolders } from "automate.ax/outlook"

export default automation("List Outlook folders", () => {
  listMailFolders({ parentFolder: "Archive", includeHidden: false, limit: 100 })
})
```

## Inputs

| Input           | Type                                                 | Required | Default         | Description                                                              |
| --------------- | ---------------------------------------------------- | -------- | --------------- | ------------------------------------------------------------------------ |
| `parentFolder`  | `string`                                             | No       | Mailbox root    | Display path, ID, or well-known name whose direct children are returned. |
| `includeHidden` | `boolean`                                            | No       | `false`         | Includes hidden folders.                                                 |
| `limit`         | `number`                                             | No       | `100`           | Maximum across Graph pages, 1–10,000.                                    |
| `account`       | `string \| IntegrationAccountReference<"microsoft">` | No       | Project default | Microsoft binding.                                                       |

## Output

Returns folders with `folderId`, `displayName`, `childFolderCount`,
`totalItemCount`, `unreadItemCount`, and `isHidden`. Numeric counts default to
zero and `isHidden` to false if Graph omits them.

Folder names match case-insensitively across the full hierarchy. Use a path such
as `Projects/Launch` or an ID when duplicate names would be ambiguous.
