
Recipe Save Email Attachments
A straightforward automation for pulling email attachments into organized Drive storage. Searches Gmail by sender or other criteria, extracts attachment metadata, downloads files locally, then uploads to your specified Drive folder. Saves you from manually downloading dozens of invoices, contracts, or reports one by one. The recipe walks through the four-step process but you'll need to handle the actual looping and error handling. Works well for batch processing client deliverables or archiving financial documents, though you'll want to add filename deduplication if you run it regularly.
- skills.sh installs
- 31.8K
- GitHub stars
- 32.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add googleworkspace/cli --skill recipe-save-email-attachments --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/googleworkspace/cli
- Categories
- CLI & Terminal, Office & Documents
More from googleworkspace/cli
All 113- Recipe Backup Sheet As Csv31.7K
- Recipe Organize Drive Folder31.7K
- Persona Exec Assistant31.6K
- Recipe Find Free Time31.5K
- Gws Workflow File Announce31.5K
- Recipe Compare Sheet Tabs31.5K
- Persona Content Creator31.5K
- Gws Events Renew31.5K
- Gws Events Subscribe31.4K
- Recipe Plan Weekly Schedule31.4K
- Recipe Bulk Download Folder31.4K
- Recipe Create Doc From Template31.4K
- Recipe Sync Contacts To Sheet31.3K
- Gws Admin Reports31.3K
- Recipe Generate Report From Sheet31.2K
- Recipe Label And Archive Emails31.1K
- Recipe Reschedule Meeting31.1K
- Recipe Save Email To Doc31.1K
- Recipe Block Focus Time31K
- Recipe Watch Drive Changes31K
- Recipe Create Shared Drive31K
- Persona Team Lead31K
- Recipe Share Doc And Notify30.9K
- Recipe Find Large Files30.9K