Skip to content
Skillpedia
Writing32k · #6336

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

https://github.com/googleworkspace/cli/blob/main/skills/recipe-save-email-attachments/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/googleworkspace/cli/blob/main/skills/recipe-save-email-attachments/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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-attachments

Or download just the file:

curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/recipe-save-email-attachments/SKILL.md -o SKILL.md
Technical 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

  1. Search for emails with attachments: gws gmail users messages list --params '{"userId": "me", "q": "has:attachment from:client@example.com"}' --format table
  2. Get message details: gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}'
  3. Download attachment: gws gmail users messages attachments get --params '{"userId": "me", "messageId": "MESSAGE_ID", "id": "ATTACHMENT_ID"}'
  4. 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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills