Actions26
Draft → Get Many
AI-generatedSummary
Fetch many Gmail drafts
Inputs
- resource (required) — Must be set to 'draft'.
- operation (required) — Must be set to 'getAll' (Get Many).
- returnAll — If true, returns all drafts ignoring Limit; if false, limits results by Limit. Default: false.
- limit — Maximum number of drafts to return when Return All is false. Range 1–500. Default: 10.
- options — Additional settings for the request and attachment handling. Default: {}.
Output shape
array
Each element represents a Gmail draft. When Download Attachments is true, binary attachment properties are added using the Attachment Prefix (e.g., 'attachment_0'). Each item includes parsed email fields (subject, body, headers, etc.) and the draft’s Gmail ID and message ID.
Examples
Example 1: Return up to 20 drafts, downloading attachments with prefix 'att_'
resource=draft, operation=getAll, returnAll=false, limit=20, options={attachmentPrefix:'att_', downloadAttachments:true}
Example 2: Return all drafts from all folders including Spam and Trash
resource=draft, operation=getAll, returnAll=true, options={includeSpamTrash:true}