Fastmail icon

Fastmail

Actions for Fastmail messages, labels, drafts and threads

Draft → Create a Draft

AI-generated

Summary

Creates a Fastmail draft message using provided recipient, subject, body, and options.

Inputs

  • fetchOptions — Options for searching and filtering messages; includes read status, search term, body inclusion, attachment handling, etc.
  • identityId (required) — The Fastmail identity (account) to send the draft from; can be selected from the list or set via expression.
  • to (required) — Comma-separated list of recipient email addresses.
  • subject — Subject line of the draft; defaults to an empty string.
  • textBody — Plain-text body of the draft; default empty.
  • htmlBody — HTML body of the draft; default empty.
  • composeOptions — Additional compose settings such as CC, BCC, reply-all, create-as-draft, and attachment binary properties.

Output shape

a single item representing the created draft, containing fields such as success (boolean), uploadedAttachments (array), and draftId (string)

When debug is enabled, additional debug data is included; failures return a JSON error object if continueOnFail is disabled.

Examples

Example 1: Create a draft email and send it to two recipients

Set To to 'alice@example.com,bob@example.com', Subject to 'Project Update', Text Body to 'Hi team, …', Html Body to '

Hi team, …

', Compose Options createAsDraft=true, IdentityId selected from list.

Links

Discussion