Fastmail icon

Fastmail

Actions for Fastmail messages, labels, drafts and threads

Draft → Get a Draft

AI-generated

Summary

Retrieves a specific Fastmail draft by ID, optionally expanding it to include body content and attachments.

Inputs

  • draftId (required) — The ID of the draft to retrieve.
  • fetchOptions — A collection of optional retrieval settings. Options include filtering by read status (any, read, unread), performing a full-text search (subject, sender, text), including body values (text and HTML), downloading attachments as binary properties, setting a binary property prefix for attachments, including message IDs, and toggling debug output.

Output shape

a single item containing the draft's metadata and optionally body content and attachments

If the draft is not found, returns an item with a 'message' field indicating 'Draft not found'. When debug is enabled, includes raw JMAP response data.

Examples

Example 1: Retrieve a draft with its full text and HTML body content

Set draftId to the target draft ID and enable 'Include Body Values' in fetchOptions.

Example 2: Retrieve a draft and download any attachments

Set draftId to the target draft ID and enable 'Download Attachments' in fetchOptions.

Links

Discussion