Skip to main content
getDraft retrieves one Gmail draft and fully parses the message stored inside it. Use it when you need to inspect a draft before updating, sending, or presenting it for review.

Example

automations/load-draft.automation.ts

Inputs

Every input, including account, also accepts a compatible Signal. Pass the draftId returned by draftEmail, draftReply, searchDrafts, or updateDraft. A draft’s messageId is not accepted here. The action fails if Gmail returns an incomplete draft or message.

Output

The action returns a Signal<Draft> with:

Message

Mailbox is { address: string; name?: string }. MessageHeader is { name: string; value: string }. Each GmailAttachment contains: