Actions25
Draft → Get
AI-generatedSummary
Retrieves specific drafts or lists all drafts from the user's current or other mailbox, optionally filtering, ordering, and expanding fields including attachments.
Inputs
- actionMailboxMode — Whether to fetch from the current mailbox or a specific shared mailbox. Defaults to current.
- actionOtherMailboxEmail — The email address of the mailbox to query when actionMailboxMode is set to 'other'. Required when that mode is selected.
- draftId — The specific ID of a draft to retrieve. If empty, lists all drafts up to the limit.
- draftUseImmutableId — Whether the provided draftId is an immutable ID (adds the Microsoft Graph Prefer header IdType="ImmutableId").
- extendedPropertyNames — Comma-separated custom extended property names to expand using exact ID filters.
- filter — Filter drafts by field values using dot-notation paths (e.g. subject, isRead). Applied client-side after fetching.
- orderBy — Sort order for listed drafts (e.g. lastModifiedDateTime desc, createdDateTime asc).
- select — Specific fields to return. Leave empty to return all fields.
- limit — Maximum number of drafts to return. Only applies when no Draft ID is provided.
- bodyToMarkdown — Whether to add Markdown content while keeping the original HTML body content.
- listAttachments — Whether to fetch attachment metadata and include it as an array on the draft object.
- downloadAttachments — Whether to download file attachment content as binary data (data_0, data_1, …).
Output shape
A list of items, each representing a draft with fields like ID, subject, body, and optionally an attachments array.
When listAttachments is true, attachments are included as metadata; when downloadAttachments is true, the binary content is added as data_0, data_1, etc. The original HTML body is preserved alongside the Markdown conversion when enabled.
Examples
Example 1: List up to 50 recent drafts sorted by last modification date.
Limit set to 50, Order By set to 'Last Modified (Newest First)', other options left at defaults.
Example 2: Retrieve a specific draft by ID including its attachments.
Draft ID provided, listAttachments set to true, downloadAttachments set to false.
Example 3: Fetch drafts from a shared mailbox filtered by unread status.
Mailbox set to 'Other' with the shared email address, filter applied for 'isRead: false'.