recipe-save-email-attachments Skill: Save Gmail Attachments to Drive
Finds Gmail messages with attachments and saves the files to a Google Drive folder.
- Installs
- 31.4K
- on skills.sh
- Stars
- 32K
- on GitHub
- Updated
- Oct 2026
- last repo commit
recipe-save-email-attachments is a four-step recipe: search Gmail for messages with attachments, open one, download the attachment, then upload it to a Drive folder. It uses the gws program through two service skills, gws-gmail and gws-drive. The example search is has:attachment from:client@example.com. It reads your mail and writes to Drive, so name the sender and the folder yourself.
Good for
- People who collect invoices, contracts or reports from email into Drive
- Assistants who file attachments from one sender
- Claude Code or Codex users who already run the gws program
Install recipe-save-email-attachments
Claude Code
- 1
Copy this prompt.
Install the recipe-save-email-attachments skill in Claude Code. Run this command: npx skills add https://github.com/googleworkspace/cli --skill recipe-save-email-attachments --skill gws-gmail --skill gws-drive --skill gws-shared -a claude-code Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js, gws installed and signed in.
Do the "First" and "Then" methods once before the skills command: they install gws and sign you in. The skills command adds 4 skills (recipe-save-email-attachments, gws-gmail, gws-drive, gws-shared) because recipe-save-email-attachments reads gws-shared first and points to the others in the set. Without gcloud, use the manual OAuth setup in the README. To limit what the sign-in grants, run gws auth login -s gmail,drive so the consent screen lists only those services.
From the vendor's docs. Source.
What's in the skill
When it loads
Find Gmail messages with attachments and save them to a Google Drive folder.
Sections in SKILL.md
- Steps
Key facts
- License
- Apache-2.0
- Installs on skills.sh
- 31,393 (Nov 2, 2026)
- GitHub stars
- 32,038 (Nov 2, 2026) (whole repo)
- Last commit
- Oct 30, 2026
- What installs
- 1 file, SKILL.md; it bundles no scripts
- skills.sh audits
- Gen Agent Trust Hub: pass, Socket: pass, Snyk: warn
- Documented setups
- skills CLI, OpenClaw, Gemini CLI extension
What it includes
Searches for mail with attachments
The example query is has:attachment from:client@example.com.
Network ·
gws gmail users messages listGets the message details
Returns the message so the agent can find the attachment ID.
Network ·
gws gmail users messages getDownloads the attachment
Needs the message ID and the attachment ID.
Network ·
gws gmail users messages attachments getUploads the file to a Drive folder
Takes a local file path and a parent folder ID.
Write ·
gws drive +upload
From the official docs
Permissions
Medium risk
It reads your Gmail messages and attachments and uploads files to Drive. Sign in with only the services you need and read each command before you approve it.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It reads your mail
The agent reads message details and attachments, and your AI provider sees what it reads. Limit the search to one sender or label. github.com
It uploads files to a Drive folder
Step 4 puts the file in the folder ID you give. Check the folder before you approve it. github.com
The project is in active development
The README says to expect breaking changes before v1.0. Re-read the install steps after you update gws. github.com
Technical details
| Turning on read-only | No read-only switch in the skill. The gws-shared skill says to prefer --dry-run for destructive operations and to confirm write commands with you. |
|---|---|
| Talks to | Google Workspace APIs through gws |
| Sign-in and keys | gws sign-in. The README says credentials are encrypted at rest (AES-256-GCM) with the key kept in your OS keyring. |
| Scopes |
|
Questions
What does recipe-save-email-attachments do?
Finds Gmail messages with attachments and saves the files to a Google Drive folder.
How do I install recipe-save-email-attachments in Claude Code?
Use the install box above. It adds recipe-save-email-attachments together with gws-gmail, gws-drive, gws-shared in one step. You also need the gws program installed and signed in to Google first, and the box lists both steps.
Does recipe-save-email-attachments work in the Claude app or Codex?
The install box has a Codex tab that uses the skills CLI's Codex target, but the repo README does not list Codex as a supported setup. The README documents no Claude app route, and every command runs the gws program in a terminal, so use Claude Code or another terminal agent.
Does recipe-save-email-attachments need an API key?
No API key. It uses your Google sign-in through gws, and the README says you need a Google Cloud project for the sign-in credentials. gws auth setup can create one if you have the gcloud CLI.
Is recipe-save-email-attachments safe?
It reads your Gmail messages and attachments and uploads files to Drive. The agent sees what it reads, so limit the search to one sender or label and check the destination folder.
Does it work on every attachment type?
The example uploads a single file called attachment.pdf. SKILL.md names no other types, so try one message first.
Do the example commands work together as written?
Two things do not line up. Step 3 has no output flag, yet step 4 uploads ./attachment.pdf, and SKILL.md never says how the attachment gets saved to that path. The gws-shared skill documents -o, --output <PATH> for saving binary responses to a file, so ask the agent to save it explicitly. Step 4 also writes --file ./attachment.pdf, while the gws-drive-upload skill documents the path as a positional argument, gws drive +upload <file>, with --parent and --name and no --file flag. Run gws drive +upload --help before the first upload.
Information
updated Nov 2, 2026
- Repository
- googleworkspace/cli
- Folder
skills/recipe-save-email-attachments
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- googleworkspace/cli README · github.com
- skills CLI commands · github.com
- recipe-save-email-attachments SKILL.md · github.com
- gws-shared SKILL.md · github.com
- gws-drive-upload SKILL.md · github.com