recipe-create-gmail-filterby Google
Create a Gmail filter to automatically label, star, or categorize incoming messages.
npx skills add https://github.com/googleworkspace/cli --skill recipe-create-gmail-filterCreate a Gmail Filter
PREREQUISITE: Load the following skills to execute this recipe:
gws-gmail
Create a Gmail filter to automatically label, star, or categorize incoming messages.
Steps
- List existing labels:
gws gmail users labels list --params '{"userId": "me"}' --format table - Create a new label:
gws gmail users labels create --params '{"userId": "me"}' --json '{"name": "Receipts"}' - Create a filter:
gws gmail users settings filters create --params '{"userId": "me"}' --json '{"criteria": {"from": "receipts@example.com"}, "action": {"addLabelIds": ["LABEL_ID"], "removeLabelIds": ["INBOX"]}}' - Verify filter:
gws gmail users settings filters list --params '{"userId": "me"}' --format table
More skills from Google
gws-groupssettings
by Google
Manage Google Groups settings.
gws-modelarmor-sanitize-response
by Google
Google Model Armor: Sanitize a model response through a Model Armor template.
gws-people
by Google
Google People: Manage contacts and profiles.
gws-reseller
by Google
Google Workspace Reseller: Manage Workspace subscriptions.
gws-shared
by Google
gws CLI: Shared patterns for authentication, global flags, and output formatting.
gws-sheets
by Google
Google Sheets: Read and write spreadsheets.
gws-sheets-append
by Google
Google Sheets: Append a row to a spreadsheet.
gws-sheets-read
by Google
Google Sheets: Read values from a spreadsheet.