Skip to content
Skillpedia
Automations32k · #9218

recipe-create-gmail-filter

What it does

This tool helps you organize your Gmail inbox. It can create automatic rules to mark, categorize, or even move important emails to specific folders without you having to do it manually.

When to use it

  • ✓When you want emails from a specific sender (like stores) to be automatically marked as 'Receipts'.
  • ✓When you want emails from a project to be separated into a different category.
  • ✓When you want promotional emails to be automatically archived so they don't clutter your main inbox.

Skill link

https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-gmail-filter/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-gmail-filter/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Create a filter so that all emails from 'newsletter@example.com' are labeled 'Newsletters' and removed from the inbox.”

5 new skills a week. 1 minute to read.

How it works

The tool first checks the labels you already have. Then, if necessary, it creates a new label. Finally, it sets up a rule in Gmail to apply the desired actions to incoming emails, based on who sent them or other characteristics.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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
FAQ

Do I need to have anything installed?

Yes, you need to have the 'gws-gmail' skill loaded for this function to work.

Can I create a new label?

Yes, the tool allows you to create new labels, such as 'Receipts' or 'Work', to organize your emails.

What happens to emails after the filter is created?

It depends on the rule you create. Emails can be labeled, starred, or even moved out of your main inbox.

Details

Original description by the author

Create a Gmail filter to automatically label, star, or categorize incoming messages.

repo: googleworkspace/cli

Popularity

GitHub stars
32k
Ranking position
#9218
License
Apache-2.0
Updated
10/6/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills