Clear a 2,000-email inbox with Gmail filters built by an agent

Liam asks the Nod agent to get his work Gmail to inbox zero: it creates labels, archives about 1,900 emails and installs 16 native Gmail filters, so there's no ongoing AI cost.

n8n · YouTube · published Nov 18, 2026 · Productivity

Clear a 2,000-email inbox with Gmail filters built by an agent — video by n8n▶ Watch on YouTube
Prompt
Can you help me get to inbox zero in my work email? I want labels created and automations for putting things into the labels. Most things in my email are notifications from things I never signed up for. I want my inbox to be only actual humans trying to have conversations with me or actual important alerts. Unsubscribe from anything addressed to me that looks like marketing, sales or non-urgent alerts.

Sponsored

Advertise here →

Visual breakdown

Liam asks the Nod agent to get his work Gmail (about 2,200 messages) to inbox zero. Nod reads the inbox, creates labels, archives roughly 1,900 emails and installs 16 native Gmail filters, so keeping up costs no more AI tokens.

The problem: His work inbox holds over 1,500 to 2,000 unread messages, mostly notifications he never signed up for, and he wants only real people and important alerts to stay.

How Nod cleans the inbox

  1. Gmail connectedNod already has Gmail set up and can list emails and existing filters
  2. One plain requestAsk for labels, automations and an inbox of only humans and key alerts
  3. Nod reads the inboxRuns as a background task, calling Gmail tools to list emails and filters
  4. Labels and filtersSorts mail into labels such as calendar and newsletters and writes 16 filters as XML
    Dropped: About 1,900 notification emails archived
  5. Import filtersGmail API lacked filter permission, so Nod drives an integrated browser and signs in via the vault
  6. Lean inboxFilters live in Gmail; inbox falls to about 80 emails, then 2 left to handle
Connected accountRequest / manual stepAI agentResult

What he asked to keep

  1. Emails from actual humans having conversations
  2. Actual important alerts
  3. Unsubscribe from marketing, sales and non-urgent alerts

By the numbers

2,200messages before
265left after the first pass
16Gmail filters imported
~$6one-time agent spend

Try it yourself

Connect Gmail to Nod, then give it one clear request about what to keep.

  1. Connect your Gmail inside Nod
  2. Describe what should stay in the inbox: real people and important alerts
  3. Tell it to unsubscribe from marketing, sales and non-urgent alerts
  4. Let the background task run; watch its activity if you like
  5. Review the summary of labels and the filter XML
  6. Choose to import filters by signing in through the browser and approve any code

Afterwards the filters are native Gmail filters, so they keep working without the agent.

Tips and caveats from the video

  • Native Gmail filters mean zero ongoing AI cost after the setup.
  • The first plan said it would not unsubscribe from anything; he had to ask for it.
  • The API couldn't create filters, so the agent used a browser and he approved a verification code.
  • The code is intercepted before it reaches the model, and logins are stored in a vault with an audit log.
  • The cleanup cost about $5 to $6 using Opus; he notes a cheaper model could save money.

Distilled from the video’s captions

How to try it

  1. Open Nod.
  2. Copy the prompt and fill in the [placeholders].
  3. Watch n8n's video for the full walkthrough and setup.

Related use cases

Share