
Save Gmail Attachments to Drive
Find Gmail messages with attachments and save them into a Google Drive folder via the gws CLI.
- Repository
- googleworkspace/cli
- Stars
- 32,059
- Licence
- Apache-2.0
- Files
- 1 file
What it does
Once installed, the agent can search your Gmail for messages that have attachments (for example, from a specific sender), read the message details, download the attachment files, and upload them to a Google Drive folder you specify. It works by running the gws command-line tool against your Google account, so it acts on real email and files rather than just giving advice. The skill is a recipe: it tells the agent which gws commands to run in which order and relies on two companion skills, gws-gmail and gws-drive, for the underlying Gmail and Drive operations.
Great for
- People who regularly file invoices, contracts or receipts from email into Drive
- Office or admin staff who collect client attachments into shared folders
- Developers who already use the gws CLI and want a ready-made workflow
Skip it if
- Anyone who has not connected their Google account to gws: the agent cannot reach Gmail or Drive without it, and granting access exposes all mail and files in that account
- Bulk archiving of large mailboxes without review: the steps only show single-message examples and may upload the wrong or sensitive files to a shared folder
- Users who need a non-Google email or storage provider, since it only covers Gmail and Google Drive
Try asking
- “Save all PDF attachments from client@example.com into my 'Client Contracts' Drive folder”
- “Find emails with attachments from my accounting firm this year and upload them to the Tax 2024 folder”
- “Download the attachment from the latest invoice email and file it in Drive”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.
recipe-save-email-attachments.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip recipe-save-email-attachments.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip recipe-save-email-attachments.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Narrow the Gmail search query (sender, date, file type) so only the intended attachments are found before anything is uploaded.
- Give a specific Drive folder ID and check the result, since the agent will upload files on your behalf.
- Review the commands the agent proposes before it runs them, especially the attachment download and upload steps.
What's inside
- SKILL.md
Redistributed unmodified from googleworkspace/cli under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.