Categorize & Label Existing Gmail Emails with GPT-4o mini

Manually processes batches of existing Gmail emails, skips labeled ones, uses GPT-4o mini to categorize, and applies matching Gmail labels automatically.

n8n
Categorize & Label Existing Gmail Emails with GPT-4o mini

This n8n workflow automates the organization of existing Gmail emails by analyzing unlabeled messages in bulk. Triggered manually, it fetches a batch (default 50) from your inbox, filters out already labeled emails, and sends the content to an AI Agent powered by GPT-4o mini for categorization. The AI outputs structured JSON via a parser, which a Switch node uses to route emails to specific Gmail label application nodes. All labels must pre-exist in your Gmail account and match the prompt-defined categories exactly.

Benefits include massive time savings for cleaning up cluttered inboxes, improved email searchability, and hands-off AI-driven sorting without coding. It's ideal for personal users overwhelmed by old emails or teams managing shared inboxes, freeing up hours for high-value tasks.

Use cases: Retroactively label thousands of newsletters, client inquiries, receipts, or promotions; prepare for audits by categorizing historical correspondence; or maintain a tidy inbox for better productivity. Pair with the incoming email version for complete automation. Requires Gmail API connection, OpenAI credentials, and pre-created labels.

$14.99
Last updated October 17, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Personal workflows

More from Jose Maurino

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.