download_attachment
Download a Gmail attachment to a local file path using message and attachment IDs. Avoids overwrites by adding a numeric suffix when the file exists, and returns the final saved path.
Instructions
Download an attachment to a local file path. If MAILWARDEN_DOWNLOAD_DIR is set, destPath is resolved inside (and restricted to) that directory. USE WHEN: the user wants an attachment saved to disk (IDs come from get_thread's attachment metadata). SIDE EFFECTS: writes a local file; never overwrites — an existing file gets a numeric suffix (file-1.pdf). The response's 'saved' field is the path actually used. Mailbox unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| destPath | Yes | ||
| messageId | Yes | ||
| attachmentId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| saved | Yes |