360 Secure SkillHub
360 安全技能中心

recipe-label-and-archive-emails

该 Skill 是一个 Gmail 操作配方:使用 gws 命令按查询条件搜索消息,为匹配邮件添加现有标签,再移除 INBOX 标签完成归档;依赖 gws CLI 和 gws-gmail Skill,不涉及标签创建或邮件删除。

googleworkspace
热度 71.89
最近更新 2026-10-18 17:15:32
分类:协作依赖:代码执行 / 第三方 API应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add googleworkspace/cli/recipe-label-and-archive-emails
Metadata
name
recipe-label-and-archive-emails
description
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
metadata
{"version":"0.22.5","openclaw":{"category":"recipe","domain":"productivity","requires":{"bins":["gws"],"skills":["gws-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:notifications@service.com"}' --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"]}'