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

> List attachments on an Outlook message.

`listAttachments` follows Graph pagination and normalizes file, item, and
reference attachments. File contents are decoded when Graph includes them.

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

export default automation("List Outlook attachments", () => {
  listAttachments({ messageId: "AAMkAGI2...", limit: 100 })
})
```

`messageId` is required. Optional `limit` defaults to 100 and permits 1–10,000
across pages. Optional `account` selects the binding.

Returns attachments with `attachmentId`, `name`, `type` (`file`, `item`,
`reference`, or `unknown`), `size`, `isInline`, optional content ID, content
location and MIME type, and optional decoded `file: File`. `file` can be absent
for metadata-only, item, and reference attachments. Use `getAttachment` when you
need one attachment's contents.
