# recipe-save-email-attachments

Find Gmail messages with attachments and save them to a Google Drive folder.

Skill by Google. Category: Documents.

## Install

Project (for this project only):

```sh
npx skills add googleworkspace/cli --skill recipe-save-email-attachments
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add googleworkspace/cli --skill recipe-save-email-attachments -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Warn
- Runlayer: Pass
- ZeroLeaks: Pass

Installs: 30153. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/site/googleworkspace.cli/recipe-save-email-attachments)

## Source

[Open the source](https://github.com/googleworkspace/cli/tree/HEAD/skills/recipe-save-email-attachments). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: recipe-save-email-attachments
description: "Find Gmail messages with attachments and save them to a Google Drive folder."
metadata:
  version: 0.22.5
  openclaw:
    category: "recipe"
    domain: "productivity"
    requires:
      bins:
        - gws
      skills:
        - gws-gmail
        - gws-drive
---

# Save Gmail Attachments to Google Drive

> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-gmail`, `gws-drive`

Find Gmail messages with attachments and save them to a Google Drive folder.

## Steps

1. Search for emails with attachments: `gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:client@example.com"}' --format table`
2. Get message details: `gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}'`
3. Download attachment: `gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}'`
4. Upload to Drive folder: `gws drive +upload --file ./attachment.pdf --parent FOLDER_ID`
````

- Previous: [persona-researcher](https://syn4pse.dev/terminal/persona-researcher.md)
- Next: [recipe-backup-sheet-as-csv](https://syn4pse.dev/terminal/recipe-backup-sheet-as-csv.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
