recipe-create-gmail-filter

Automated Gmail message routing through filters that label, star, or archive incoming mail. Requires the gws-gmail skill and gws binary to execute filter operations Supports filter criteria matching (sender, subject, keywords) with actions including label assignment, removal from inbox, and archiving Includes commands to list existing labels, create new labels, apply filters, and verify filter configuration

INSTALLATION
npx skills add https://github.com/googleworkspace/cli --skill recipe-create-gmail-filter
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

Create 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
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card