recipe-save-email-attachments
Lets your agent find emails with attachments and save them to Google Drive. This organizes your important files automatically.
What it does
This assistant finds emails with attachments in your Gmail and saves those attachments to a folder in your Google Drive. It's useful for organizing important files you receive via email.
When to use it
- ✓When you receive important invoices or receipts via email.
- ✓To save presentations or documents shared by clients.
- ✓When receiving photos or project files via email and wanting to keep them.
Example of what to ask your AI
“Save attachments from emails from client X to the 'Client X Projects' folder in my Google Drive.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It searches your Gmail for emails with attachments, retrieves the files, and uploads them to a specific folder in your Google Drive.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add googleworkspace/cli --skill recipe-save-email-attachmentsOr download just the file:
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/recipe-save-email-attachments/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
- Search for emails with attachments:
gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:client@example.com"}' --format table - Get message details:
gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}' - Download attachment:
gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}' - Upload to Drive folder:
gws drive +upload --file ./attachment.pdf --parent FOLDER_ID
FAQ
Do I need to have Gmail and Google Drive set up?
Yes, you need to have permissions to access your Gmail and Google Drive connected.
Can I choose which sender's attachments to save?
Yes, you can specify the sender in your request, like 'save attachments from so-and-so's email'.
Can I choose the folder where the attachments will be saved?
Yes, you can indicate the Google Drive folder in your request, like 'save to the Important Documents folder'.
Details
Original description by the author
Find Gmail messages with attachments and save them to a Google Drive folder.
repo: googleworkspace/cli
Popularity
- GitHub stars
- 32k
- Ranking position
- #6336
- License
- Apache-2.0
- Updated
- 10/6/2026
Comments
- …
More skills from this repository
gws-admin-reports
Helps your agent get activity reports from Google Workspace. It collects audit and usage data.
googleworkspace/cli
gws-calendar-agenda
Helps your agent see upcoming events across all calendars. It's useful for organizing your schedule and knowing what's coming up.
googleworkspace/cli
gws-calendar-insert
Lets your agent create new events in Google Calendar. It's useful for scheduling appointments and meetings.
googleworkspace/cli
gws-calendar
Allows your agent to manage calendars and events. It's useful for organizing your life and work.
googleworkspace/cli
Similar skills
intent-driven-development
Helps your agent turn ideas into clear, testable plans. Defines criteria to ensure changes are made correctly and safely.
affaan-m/ECC
product-capability
Guides your agent in turning product ideas into clear plans. It defines what needs to be done, the limits, and decisions before development.
affaan-m/ECC
article-writing
Writes long-form content like articles, guides, and blog posts with a unique style. It's useful when you need well-written texts with a consistent voice and credibility.
affaan-m/ECC