Skip to main content
outlook.draftEmail creates a draft and returns its message record. Use messageId to update, attach files, or send it.

Example

automations/draft-outlook-email.automation.ts

Inputs

Requires non-empty to, subject, and body. bodyType defaults to text. Optional cc, bcc, and replyTo accept email strings or { address, name? } objects. Each field accepts one recipient or an array. importance, receipt-request booleans, and attachments: File[] are optional. Optional second argument { account } selects the Microsoft binding. Direct attachments are each limited to 3,000,000 bytes.

Output

Returns the created OutlookMessage, normally with isDraft: true, its stable messageId, and Graph’s available recipients, body, state, IDs, timestamps, and web metadata. Pass messageId to outlook.sendDraft after review.