Gmail → AI Email Categorizer

AI & Dataintermediate20 minutes setup

Overview

All the workflows, credentials and data tables you have access to

Create workflow
Prod. executions
0
Failed prod. executions
0
Failure rate
0%
Time saved
Run time (avg.)
0s
WorkflowsCredentialsExecutionsData tables
Search workflows...
Last updated
Gmail AI Categorizer
Updated 2 days ago
Personal
Abandoned Cart Recovery
Updated 5 days ago
Personal

$29

Sign in to purchase

Or get 20% off with Pro — $23, $19/month

Updated Jul 2, 2026

100% n8n compatible

Stop manually sorting your inbox. This workflow reads new Gmail messages, classifies intent with AI, applies labels, and routes urgent emails to the right team.

Business Impact

  • Save 2–5 hours/week on inbox triage
  • Automatically categorize every incoming email
  • Reduce manual inbox management and missed priorities
  • Uses GPT-4o Mini for extremely low AI costs

Who is this for?

Perfect for:

  • Agencies
  • SaaS founders
  • Customer support teams
  • Freelancers
  • Businesses receiving 20+ emails/day

What's included

  • n8n JSON workflow file
  • Step-by-step setup guide
  • All AI prompts included
  • Lifetime updates

Setup Guide

  1. 1Download and import the workflow JSON into n8n
  2. 2Connect your Gmail account via OAuth2 — n8n will ask you to authorize access to your Gmail
  3. 3Create Gmail labels manually before activating: Label_SalesLead, Label_Support, Label_Invoice, Label_Newsletter, Label_Internal, Label_Other
  4. 4Connect your OpenAI API key in the OpenAI node (get it from platform.openai.com → API Keys)
  5. 5Make sure you have credits in your OpenAI account (even $5 will process thousands of emails)
  6. 6Set the polling interval in the Gmail Trigger — every minute is recommended for real-time feel
  7. 7Click Save → Activate the workflow
  8. 8Send yourself a test email with subject "Invoice from Acme - $500" and wait up to 1 minute
  9. 9Check your Gmail — the email should have the Label_Invoice label applied automatically
  10. 10Test with other email types to verify all categories work correctly

Required Credentials

  • Gmail OAuth2 (via Google Cloud Console)Configure in n8n
  • OpenAI API KeyConfigure in n8n

Nodes Used

Gmail TriggerHTTP RequestCodeGmail

Common Mistakes

  • Creating Gmail labels with different names than the ones in the workflow — label names must match exactly
  • Not having OpenAI credits — the workflow will fail silently if your account has no credit balance
  • Using GPT-4o instead of GPT-4o-mini — this workflow uses mini which is 10x cheaper and sufficient for classification
  • Expecting instant results — the Gmail trigger polls every minute, so there is up to a 60 second delay
  • Not enabling the Gmail API in Google Cloud Console before creating OAuth credentials

Architecture

Gmail Trigger
HTTP Request
Code
Gmail
Output

Tags

gmailaiemailproductivity