ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

gmail-label-routing

Configurar en Gmail el enrutamiento por remitente hacia etiquetas usando el workflow local `scripts/gws_gmail_label_workflow.py`, incluyendo crear/usar etiqueta, crear filtro, aplicar retroactivo y opcionalmente sacar de INBOX. Usar cuando el usuario pida cosas como “manda este remitente a esta etiqueta”, “hazlo para varios remitentes”, “aplícalo a correos existentes”, “sácalos de INBOX”, o “limpia/reemplaza filtros duplicados para ese remitente”.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/1u1s4/gmail-label-routing
Or

What This Skill Does

The gmail-label-routing skill provides a standardized, automated approach for managing email organization within Gmail. It leverages a dedicated local Python workflow script (scripts/gws_gmail_label_workflow.py) to handle the complex intersection of Gmail filters, label assignment, and inbox management. By using this skill, users can bypass the manual, error-prone process of navigating the Gmail web interface to set up individual routing rules. The tool is designed to create or retrieve labels, generate precise filtering logic, retroactively apply those filters to existing messages, and optionally archive emails to keep the primary inbox clutter-free. This ensures a consistent mail management system, especially for power users handling dozens of mailing lists or recurring sender interactions.

Installation

To add this capability to your OpenClaw environment, execute the following command in your terminal: clawhub install openclaw/skills/skills/1u1s4/gmail-label-routing

Ensure that you have the appropriate OAuth credentials configured locally, as the skill utilizes them as a fallback mechanism for interacting with the Gmail API when standard scopes are insufficient. The script operates from the root of the skill directory.

Use Cases

This skill is perfect for users who feel overwhelmed by an unorganized inbox. Key scenarios include:

  • Moving all newsletters from a specific domain into a dedicated "Newsletters" folder.
  • Automating the processing of automated system alerts so they skip the inbox but remain accessible.
  • Consolidating scattered filters for a specific high-volume sender into a single, clean rule set.
  • Batch-processing historical emails that match a newly defined organizational strategy.

Example Prompts

  1. "Manda todos los correos de [email protected] a la etiqueta 'Soporte' y sácalos de la bandeja de entrada."
  2. "Haz lo mismo para los correos de [email protected] y [email protected]; aplícalo también a los correos que ya tengo en mi bandeja."
  3. "Limpia los filtros duplicados para '[email protected]' y asegúrate de que todos se guarden bajo 'Finanzas' sin aparecer en INBOX."

Tips & Limitations

  • Always use the --dry-run flag if you are testing a new filter strategy to ensure that the regex or sender matching logic behaves as expected before permanent application.
  • When defining multiple senders, remember to pass the --sender flag repeatedly. Failure to wrap labels or sender addresses in quotes may cause the shell to misinterpret input parameters.
  • If you notice conflicting rules, leverage the --replace-sender-filters flag to overwrite existing, redundant Gmail filters that might be causing "double routing" issues. Keep in mind that while the script is robust, mass retroactive processing of thousands of emails may take a few moments depending on Gmail API response times.

Metadata

Author@1u1s4
Stars4473
Views2
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-1u1s4-gmail-label-routing": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#gmail#automation#productivity#email-routing#labels
Safety Score: 4/5

Flags: file-read, file-write, external-api, code-execution