recipe-create-gmail-filter
googleworkspace/cli
Automatically organize Gmail messages with filters, labels, and stars.
What is recipe-create-gmail-filter?
Create Gmail filters to automatically apply labels, stars, or categories to incoming messages based on sender, subject, or content criteria. Use this when you want to organize email without manual sorting.
- List existing Gmail labels
- Create new custom labels for message organization
- Set up filters with criteria (sender, subject, etc.) to automatically apply actions
- Configure filter actions including adding/removing labels and starring messages
- Verify created filters are working correctly
How to install recipe-create-gmail-filter
npx skills add null --skill recipe-create-gmail-filter- gws-gmail skill must be installed and loaded
- Access to Google Workspace Gmail API
- User must have permission to create labels and filters in their Gmail account
How to use recipe-create-gmail-filter
- 1.Run the list labels command to see existing labels available in your account
- 2.Create a new label if needed using the labels create command with your desired label name
- 3.Define filter criteria (from address, subject line, etc.) and desired actions (add label, remove from inbox, etc.)
- 4.Execute the filter creation command with your criteria and action parameters
- 5.Verify the filter was created successfully by listing all filters
Use cases
- Route receipts from online stores to a dedicated Receipts label automatically
- Remove promotional emails from inbox and file them to a Promotions label
- Star important messages from specific senders for quick visibility
- Automatically categorize invoices, newsletters, or project updates into labeled folders
- Organize work emails separately from personal messages
- Email administrators managing Gmail accounts
- Users with high email volume needing automated organization
- Teams standardizing email workflows across Google Workspace
recipe-create-gmail-filter FAQ
Filters support criteria including: from (sender address), to (recipient), subject line, has words, does not have words, size, date range, and more. Combine multiple criteria for precise filtering.
Yes, a single filter can apply multiple actions simultaneously, such as adding a label AND removing from inbox AND starring the message.
Use the 'gws gmail users labels list' command to display all labels with their IDs in table format.
Yes, filters can be updated or deleted using the gws gmail users settings filters update and delete commands with the filter ID.
Gmail filters typically apply only to new incoming messages after creation, not retroactively to existing emails.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
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
- 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
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.