Unitalk Gmail icon

Unitalk Gmail

Consume the Gmail API with Unitalk

Draft → Get

AI-generated

Summary

Fetch a specific draft by its ID from Gmail, returning parsed email metadata, content, and optional attachments.

Inputs

  • messageId (required) — The unique ID of the Gmail draft to retrieve.
  • options.dataPropertyAttachmentsPrefixName — Prefix for the binary property names when attachments are downloaded (default is 'attachment_').
  • options.downloadAttachments — When set to true, downloads attachments associated with the draft into binary properties.

Output shape

a single item

Returns the draft's parsed email fields and headers in the JSON payload, along with the draft ID and internal message ID. If 'Download Attachments' is enabled, attachments are returned in the binary output.

Examples

Example 1: Retrieve a draft by ID

Set Draft ID to r-3254521568507167962.

Example 2: Get a draft and download attached files

Set Draft ID to r-3254521568507167962 and enable Download Attachments under Options.

Links

Discussion