SKILL.md
readonlyread-only
name
recipe-create-gmail-filter
description
建立一個 Gmail 篩選器,自動為收到的郵件加上標籤、星號或進行分類。
建立 Gmail 篩選器
前置條件: 載入以下技能以執行此食譜:
gws-gmail
建立一個 Gmail 篩選器,自動為收到的郵件加上標籤、星號或進行分類。
步驟
- 列出現有標籤:
gws gmail users labels list --params '{"userId": "me"}' --format table - 建立新標籤:
gws gmail users labels create --params '{"userId": "me"}' --json '{"name": "Receipts"}' - 建立篩選器:
gws gmail users settings filters create --params '{"userId": "me"}' --json '{"criteria": {"from": "receipts@example.com"}, "action": {"addLabelIds": ["LABEL_ID"], "removeLabelIds": ["INBOX"]}}' - 驗證篩選器:
gws gmail users settings filters list --params '{"userId": "me"}' --format table






