Create a Gmail filter to automatically label, star, or categorize incoming messages.
Install with the open skills CLI (global, non-interactive — available in every Claude Code session):
npx skills add googleworkspace/cli --skill "recipe-create-gmail-filter" -g -a claude-code -yOr manually — copy the SKILL.md below into:
~/.claude/skills/recipe-create-gmail-filter-googleworkspace/SKILL.md---
name: recipe-create-gmail-filter
description: "Create a Gmail filter to automatically label, star, or categorize incoming messages."
metadata:
version: 0.22.5
openclaw:
category: "recipe"
domain: "productivity"
requires:
bins:
- gws
skills:
- gws-gmail
---
# 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
1. List existing labels: `gws gmail users labels list --params '{"userId": "me"}' --format table`
2. Create a new label: `gws gmail users labels create --params '{"userId": "me"}' --json '{"name": "Receipts"}'`
3. Create a filter: `gws gmail users settings filters create --params '{"userId": "me"}' --json '{"criteria": {"from": "receipts@example.com"}, "action": {"addLabelIds": ["LABEL_ID"], "removeLabelIds": ["INBOX"]}}'`
4. Verify filter: `gws gmail users settings filters list --params '{"userId": "me"}' --format table`
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Use when executing implementation plans with independent tasks in the current session