> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Gmail get attachment

> Download and read the content of an email attachment from Gmail. Requires the messageId and attachmentId from the attachments list returned by…

`gmail_get_attachment`

Download and read the content of an email attachment from Gmail. Requires the `messageId` and `attachmentId` from the attachments list returned by `gmail_get_message` or `gmail_get_thread`. PDFs are extracted to text server-side. Text-based files (CSV, JSON, TXT, HTML, XML) are returned as text. All other formats (DOCX, XLSX, images, etc.) are returned as raw base64 for direct reading.

## Parameters

<ParamField path="messageId" type="string" required>
  Gmail message ID that contains the attachment.
</ParamField>

<ParamField path="attachmentId" type="string" required>
  Attachment ID from the message's attachments list.
</ParamField>

<ParamField path="filename" type="string">
  Original filename (from attachments list) — used for format detection.
</ParamField>

<ParamField path="mimeType" type="string">
  MIME type of the attachment (from attachments list).
</ParamField>
