recipe-label-and-archive-emails

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Label and Archive Gmail Threads

为Gmail对话线程打标签并归档

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.
前提条件: 加载以下skill以执行此方案:
gws-gmail
为匹配的邮件添加Gmail标签并将其归档,以保持收件箱整洁。

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"]}'
  1. 搜索匹配的邮件:
    gws gmail users messages list --params '{\"userId\": \"me\", \"q\": \"from:notifications@service.com\"}' --format table
  2. 添加标签:
    gws gmail users messages modify --params '{\"userId\": \"me\", \"id\": \"MESSAGE_ID\"}' --json '{\"addLabelIds\": [\"LABEL_ID\"]}'
  3. 归档(从收件箱移除):
    gws gmail users messages modify --params '{\"userId\": \"me\", \"id\": \"MESSAGE_ID\"}' --json '{\"removeLabelIds\": [\"INBOX\"]}'