recipe-create-gmail-filter

recipe-create-gmail-filter

熱門

建立一個 Gmail 篩選器,自動為收到的郵件加上標籤、星號或進行分類。

2.7萬星標
1669分支
更新於 2026/3/31
SKILL.md
readonlyread-only
name
recipe-create-gmail-filter
description

建立一個 Gmail 篩選器,自動為收到的郵件加上標籤、星號或進行分類。

建立 Gmail 篩選器

前置條件: 載入以下技能以執行此食譜:gws-gmail

建立一個 Gmail 篩選器,自動為收到的郵件加上標籤、星號或進行分類。

步驟

  1. 列出現有標籤:gws gmail users labels list --params '{"userId": "me"}' --format table
  2. 建立新標籤:gws gmail users labels create --params '{"userId": "me"}' --json '{"name": "Receipts"}'
  3. 建立篩選器:gws gmail users settings filters create --params '{"userId": "me"}' --json '{"criteria": {"from": "receipts@example.com"}, "action": {"addLabelIds": ["LABEL_ID"], "removeLabelIds": ["INBOX"]}}'
  4. 驗證篩選器:gws gmail users settings filters list --params '{"userId": "me"}' --format table