Skip to main content
gmail.draftEmail creates a message for review or later completion without sending it.

Example

automations/draft-follow-up.automation.ts
Recipients, subject, and body are all optional, so the action can create an incomplete draft.

Inputs

Recipient is an email string or { address: string; name?: string }. Attachment is a File or an object containing file with optional filename, contentId, and disposition: "attachment" | "inline". Inputs accept compatible signals. The draft carries an authenticated automation origin. If it’s sent later, Gmail triggers don’t wake the automation that created it, while other automations watching the mailbox still receive the event.

Output

Returns Signal<DraftIdentifier>: draftId and messageId are different identifiers. Pass draftId to gmail.getDraft, gmail.updateDraft, gmail.sendDraft, or gmail.deleteDraft.