Download Attachment
download_attachmentRetrieve an email attachment's binary content as a base64-encoded string. Specify the email UID and 0-based attachment index; include the folder to prevent cross-folder UID clashes.
Instructions
Download the binary content of an email attachment as a base64-encoded string. Use get_email_by_id first to see available attachments and their indices (0-based). Provide the message folder to avoid a cross-folder UID collision; it is required for folder-restricted agents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Folder the email lives in. Required for folder-restricted agents and recommended for all callers because IMAP UIDs are per-folder. | |
| email_id | Yes | IMAP UID of the email | |
| account_id | No | Optional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab). | |
| attachment_index | Yes | 0-based index of the attachment (from get_email_by_id attachments array) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| content | Yes | Base64-encoded attachment content | |
| encoding | Yes | ||
| filename | Yes | ||
| contentType | Yes |