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.
recipe-create-meet-space
Create a Google Meet space and email the join link to participants.
recipe-create-presentation
Create a new Google Slides presentation with initial slides and share it with your team.
recipe-create-shared-drive
Create a Google Shared Drive and manage member access with specific roles.
recipe-create-task-list
Set up a new Google Tasks list with initial tasks using the Google Workspace CLI.
recipe-create-vacation-responder
Set up Gmail out-of-office auto-replies with custom messages and date ranges.
recipe-deploy-apps-script
Push local files to a Google Apps Script project.