自动化32k · #9230
recipe-label-and-archive-emails
它能做什么
这个工具可以帮你整理 Gmail 邮件。它会为邮件添加标签(也就是分类),并把邮件从主收件箱中移走,让收件箱保持整洁。
适用场景
- ✓当你经常收到某个发件人的邮件时。
- ✓当你想把通知类邮件和其他重要邮件分开时。
- ✓当你想自动保持收件箱整洁时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/recipe-label-and-archive-emails/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/recipe-label-and-archive-emails/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill recipe-label-and-archive-emails
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/recipe-label-and-archive-emails/SKILL.md -o SKILL.md
可以这样问 AI
“把发件人为 'notifications@service.com' 的邮件加上“通知”标签,并归档。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会搜索指定发件人的邮件,然后添加你选择的标签,并把这些邮件从主收件箱中移除。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Label and Archive Gmail Threads
PREREQUISITE: Load the following skills to execute this recipe:
gws-gmail
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
Steps
- Search for matching emails:
gws gmail users messages list --params '{"userId": "me", "q": "from:notifications@service.com"}' --format table - Apply a label:
gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"addLabelIds": ["LABEL_ID"]}' - Archive (remove from inbox):
gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"removeLabelIds": ["INBOX"]}'
常见问题
我需要先有 Gmail 吗?
需要。这个工具需要配合你的 Gmail 账户使用。
Gmail 中的标签是什么?
标签就像文件夹或分类,可以用来整理邮件,帮你更容易地找到邮件。
“归档”邮件是什么意思?
归档会把邮件从主收件箱中移走,但邮件仍然保存在你的账户中,之后依然可以找到。
详情
作者的原始描述
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
repo: googleworkspace/cli
热度
- GitHub 星标
- 32k
- 排名
- #9230
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …