createDraft
Create Email Draft
Create a Gmail draft without sending it.
Arguments
blocksobject[]optionalStructured rich email body. When present, it wins over both richBody and body.bodystringoptionalPlain text email body. Required unless `blocks` or `richBody` is provided; when combined with either, this is the explicit text/plain part.richBodystringoptionalMarkdown email body for formatted mail. Supports paragraphs, h1-h3 headings, bold, italic, links, lists, blockquote, inline and fenced code, horizontal rules, and image URLs. When provided, it wins over `body` for the HTML part.accountIdstringoptionalAlias of `from`: the accountId from listMailAccounts. Takes precedence over `from` if both are given.attachmentsobject[]optionalCloud files to attach, in order: up to 20 files, 25 MB in total. Page exports are not attachable, so attach the PDF as a Cloud file if there is one. Only promise an attachment after the result comes back with it in `attached`.bccstringoptionalBCC email address (optional)ccstringoptionalCC email address (optional)docContractstringoptionalThe type-slug of the doc contract this is filed under (e.g. "handoff-memo"), when it is a staple rather than ordinary prose. The server validates the text against that contract and refuses a malformed one, handing back the contract's…fromstringoptionalAccount to draft AS: an accountId or email from listMailAccounts. Omit to draft from the primary account. The draft LIVES in this account: pass the same value to listDrafts/deleteDraft to find and remove it.replyAllbooleanoptionalReply to EVERYONE on the original (its sender plus every To recipient in To, its Cc in Cc), minus the user's own addresses. Only meaningful with replyToMessageId and no explicit `to`.replyToMessageIdstringoptionalMessage ID this draft replies to: threads the draft and composes its recipients from the original.subjectstringrequiredEmail subject linetostringoptionalRecipient email address. Omit ONLY when drafting a reply (replyToMessageId set): the recipients are then composed from the original message.
Returns
Returns the draftId: send it later with sendDraft, which sends this EXACT draft; never re-type it into sendEmail (that sends a different message and leaves this draft behind).
Declared limits
blocks: minimum items 1blocks: maximum items 100attachments: maximum items 20
Ask for it
The Cloud routes these requests to this verb.
- draft an email
- start a message to X
- draft a reply
- write but don't send
Pair it with
The verbs that finish the job.