download_attachment
Save an email attachment to the configured download directory by filename or index (or automatically if the message has one). Returns the saved file path.
Instructions
Save an attachment from a message to disk (into the configured download directory). Identify it by filename or 0-based index (from get_message); if the message has just one attachment, neither is needed. Returns the saved file path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | The message uid. | |
| index | No | 0-based attachment index (alternative to filename). | |
| mailbox | No | The mailbox the uid belongs to (default "INBOX"). | |
| filename | No | The attachment filename to save. |