get_attachment_text
Extract readable text from text-based email attachments (plain text, CSV, Markdown, JSON, XML, HTML, calendar) without base64 encoding, supporting up to 512KB. Not for PDFs or images.
Instructions
Extract plain text from a text-like attachment (text/plain, text/csv, text/markdown, application/json, application/xml, text/html stripped of markup, text/calendar summarized) without dealing with base64 encoding. Not gated by the smaller inline-base64 size limit that get_attachment_content uses — bounded separately at 512KB of raw content. Fails clearly for non-text formats (e.g. PDF, images) — use get_attachment_content or save_attachment for those.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | Composite email id in FOLDER::UID format, as returned by get_emails or search_emails. | |
| attachmentId | Yes | Stable attachment id returned by list_attachments. |