中风险
未要求确认匹配结果便修改并归档 Gmail 邮件
原文依据:4 处发现了什么
流程在搜索后直接指示执行两次写操作,没有要求向用户展示最终查询、匹配数量或邮件样本,也没有在归档前取得明确确认。添加标签与归档还是两个独立操作,执行中断时可能只完成其中一步。
为什么需要注意
如果查询、MESSAGE_ID 或 LABEL_ID 替换错误,非目标邮件可能被错误分类并从收件箱移除,导致用户漏看邮件。归档通常可以撤销,但用户可能不会及时发现。
该流程是实时操作指令:搜索后直接要求对指定 MESSAGE_ID 添加标签并移除 INBOX,未包含展示匹配邮件或在写入前确认的步骤。若代理把示例查询替换为较宽的条件并逐条执行,用户尚未核对的邮件可能被归档;两次修改彼此独立,中断也可能造成仅加标签而未归档。归档是技能声明的正常用途,并非隐蔽行为,但用户可要求作者增加匹配数量/样本预览、明确确认和失败恢复说明。
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"]}'`查看另外 3 个位置
Apply Gmail labels to matching messages and archive them to keep your inbox clean.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"]}'`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"]}'`