Skip to main content
outlook.updateMessage changes selected fields. Recipients, subject, and body are generally draft-only. Read state, flags, categories, and importance can also apply to received mail when Microsoft allows.

Example

automations/update-outlook-draft.automation.ts

Inputs

Provide messageId. Optional replacements are to, cc, bcc, subject, body, bodyType, categories, importance, isRead, and flagStatus. flagStatus accepts notFlagged, complete, or flagged. bodyType only matters when replacing body and defaults to text for that update. Recipient lists replace, rather than append to, their existing fields. Second argument { account } selects the binding.

Output

Returns Graph’s updated normalized OutlookMessage. Microsoft rejects fields that aren’t writable for the message’s current state.