PluginBench
Skill
Pass
Audit score 90

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
Prerequisites
  • 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
Claude Code
Cursor
Windsurf
Cline

How to use recipe-create-gmail-filter

  1. 1.Run the list labels command to see existing labels available in your account
  2. 2.Create a new label if needed using the labels create command with your desired label name
  3. 3.Define filter criteria (from address, subject line, etc.) and desired actions (add label, remove from inbox, etc.)
  4. 4.Execute the filter creation command with your criteria and action parameters
  5. 5.Verify the filter was created successfully by listing all filters

Use cases

Good for
  • 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
Who it's for
  • 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

What criteria can I use for a Gmail filter?

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.

Can I apply multiple actions to a single filter?

Yes, a single filter can apply multiple actions simultaneously, such as adding a label AND removing from inbox AND starring the message.

How do I find the LABEL_ID for use in filter actions?

Use the 'gws gmail users labels list' command to display all labels with their IDs in table format.

Can I modify or delete a filter after creating it?

Yes, filters can be updated or deleted using the gws gmail users settings filters update and delete commands with the filter ID.

Will filters apply to existing emails or only new incoming messages?

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

  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