Recipe Label And Archive Emails

作者 googleworkspacea3768d0e82ad无许可证31K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Apply Gmail labels to matching messages and archive them to keep your inbox clean.

AI 生成的概览

为匹配的 Gmail 邮件添加标签并将其归档,以保持收件箱整洁。

功能
该配方描述了一个三步 Gmail 工作流:搜索匹配查询条件的邮件、为邮件添加标签,以及通过移除 INBOX 标签将其归档。它会生成已加标签并已归档的 Gmail 会话。它仅包含说明,不附带脚本。
适用场景
当你需要整理符合搜索条件的 Gmail 邮件(例如来自某个特定发件人的通知)时使用。它适合将邮件加标签并移出收件箱的日常收件箱清理工作。
运行要求
需要 gws 命令行工具,并需加载 gws-gmail 技能。需要 Gmail 账户访问权限来列出和修改邮件。不包含脚本。

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

  1. Search for matching emails: gws gmail users messages list --params '{"userId": "me", "q": "from:[email protected]"}' --format table
  2. Apply a label: gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"addLabelIds": ["LABEL_ID"]}'
  3. Archive (remove from inbox): gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"removeLabelIds": ["INBOX"]}'

来源与署名

来源:googleworkspace/cli位于skills/recipe-label-and-archive-emails提交a3768d0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架