
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.
$ npx -y skills add googleworkspace/cli --skill recipe-save-email-attachments --agent claude-codeInstalls into .claude/skills of the current project.
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.
gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:client@example.com"}' --format tablegws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}'gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}'gws drive +upload --file ./attachment.pdf --parent FOLDER_IDSponsors