gmail_get_message
Fetch a single Gmail message by ID to read its headers, decoded body, or attachments; supports text, metadata, or raw .eml formats.
Instructions
Fetch a single Gmail message.
Uses ADC credentials and sends the mandatory quota-project header.
Args:
message_id: The Gmail message id.
format: "text" (default) returns {id, threadId, labelIds, headers, body, attachments} with the body decoded to plain text (HTML-only mail is
stripped of tags). "metadata", "minimal" and "full" return the
Gmail message resource unchanged, up to 1 MB. "raw" saves the whole
RFC 822 message, attachments included, to <message id>.eml in the
download directory, and returns the resource with path,
mimeType and bytes in place of the base64 raw field.
Returns: The message as JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | text | |
| message_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |