recipe-save-email-attachments
它能做什么
这个助手会在你的 Gmail 中查找带附件的邮件,并把附件保存到你 Google 云端硬盘的某个文件夹中。对于整理通过邮件收到的重要文件很有帮助。
适用场景
- ✓收到重要的发票或收据时。
- ✓保存客户通过邮件分享的演示文稿或文档时。
- ✓通过邮件收到照片或项目文件,并希望留存时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/recipe-save-email-attachments/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把客户 X 的邮件附件保存到我 Google 云端硬盘中的“Client X Projects”文件夹。”
每周 5 个新技能,1 分钟读完。
工作原理
它会在你的 Gmail 中搜索带附件的邮件,获取这些文件,然后上传到你 Google 云端硬盘中的指定文件夹。
技术内容(原始 SKILL.md)
作者在 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
常见问题
我需要设置好 Gmail 和 Google 云端硬盘吗?
需要。你得授权这个工具访问你的 Gmail 和 Google 云端硬盘。
我可以选择只保存某个发件人的附件吗?
可以。你可以在请求中指定发件人,比如“保存某某的邮件附件”。
我可以选择附件保存到哪个文件夹吗?
可以。你可以在请求中指明 Google 云端硬盘中的文件夹,比如“保存到重要文档文件夹”。
详情
作者的原始描述
Find Gmail messages with attachments and save them to a Google Drive folder.
repo: googleworkspace/cli
热度
- GitHub 星标
- 32k
- 排名
- #9238
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …