recipe-label-and-archive-emails

Label and archive matching Gmail messages using the Gmail API.

Updated May 25, 2025
One-click install
npx skills add https://github.com/temple-slope/dotfiles --skill recipe-label-and-archive-emails-temple-slope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recipe-label-and-archive-emails
Source: https://github.com/temple-slope/dotfiles/tree/main/.agents/skills/recipe-label-and-archive-emails
Command: npx skills add https://github.com/temple-slope/dotfiles --skill recipe-label-and-archive-emails-temple-slope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gmail inbox clutter from unprioritized messages can overwhelm your view. This recipe automates labeling and moving important threads out of the inbox by applying labels and archiving matched messages.

Core Features & Use Cases

  • Label matching emails based on sender or content criteria using Gmail API.
  • Archive labeled messages to remove them from the Inbox while preserving them for later reference.
  • Use Case: Automatically clean up newsletters or notifications by labeling and archiving them.

Quick Start

Load the gws-gmail skill and run this recipe to label and archive Gmail messages that match your criteria.

Frequently Asked Questions about recipe-label-and-archive-emails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically label and archive Gmail messages to declutter my inbox?

You can automatically label and archive Gmail messages by using criteria to match specific senders or content, applying label IDs, and removing the INBOX tag via Gmail API calls. This routine housekeeping workflow keeps your inbox clear while preserving threads for later reference.

Do I need to load a specific Gmail skill before I can automate email archiving?

Yes, you must load the gws-gmail skill as a prerequisite. This integration provides the necessary Gmail API calls to list messages, apply label IDs, and remove the INBOX attribute so matched threads can be successfully archived.

What is the best way to clean up Gmail newsletters and notifications automatically?

The best way to clean up Gmail newsletters is to automate a workflow that matches messages from defined senders, applies a specific label, and archives them. This removes routine notifications from your inbox view while keeping them accessible under their assigned labels.

Can I use Gmail API to apply labels and remove messages from the inbox at the same time?

Yes, you can use Gmail API calls to apply label IDs and remove the INBOX designation simultaneously. This action archives matched messages immediately, decluttering your inbox without deleting the underlying email threads.

Why does my Gmail inbox stay cluttered even when I manually organize routine messages?

Your Gmail inbox stays cluttered because manual sorting cannot keep up with incoming routine messages. Automating label application and archiving based on sender or content matching ensures consistent inbox cleanup without ongoing manual effort.

Are there limitations to automating Gmail email management with API calls for archiving?

Automating Gmail email management with API calls requires the gws-gmail skill to be loaded first. Additionally, matching criteria must be carefully defined to ensure only intended messages are labeled and archived, avoiding accidental removal of high-priority emails from your inbox.