How to automatically sort business emails with AI in Gmail

Leads, invoices, complaints and cold pitches all land in one inbox, and sorting them eats the first hour of your day. Here's how to have AI label every email and flag the ones that can't wait.

Updated October 21, 2026 · App names checked against vendor documentation; vendors rename things, so search the step picker for the key word if a name differs.

What AI email sorting does (and doesn't do)

Each new email is read by an AI step that picks one category (for example Lead, Customer, Billing, Vendor, Urgent or FYI) and writes a one-line summary. Your automation then adds a matching Gmail label and, for the important categories, sends you a short alert.

What it doesn't do: delete, archive or reply to anything. You still read your mail. You just open the AI/Lead and AI/Urgent labels first and leave the vendor pitches for Friday.

Try Gmail's built-in tools first

If most of your sorting is predictable (the same senders, the same subjects), plain Gmail filters do it for free: Settings › Filters and blocked addresses › Create a new filter. Gmail's own Promotions and Updates tabs also catch a lot of newsletters. AI earns its place when the category depends on what the email says. A new customer and an existing one can write from addresses you've never seen, and a complaint doesn't come with a subject line that says 'complaint'.

Step 1: Create your labels

In Gmail, create a parent label AI with these nested labels:

Six categories is plenty. More than about eight and the AI (and you) start to blur the lines.

Step 2: The classifier prompt

Free template: email classifier prompt
Classify this email for a small business owner. Reply in exactly this format and nothing else:
CATEGORY | one-line summary (max 15 words)

Categories:
Lead = a potential new customer asking about our services
Customer = an existing customer with a question, change or problem
Billing = invoices, receipts, payments, bank, tax
Vendor = sales pitches, newsletters, cold outreach, SEO/marketing offers
Urgent = a same-day deadline, a complaint, a legal notice, or a safety issue
FYI = everything else

Our business: [one sentence on what you do], so a request for [your main services] is a Lead.

From: {{From}}
Subject: {{Subject}}
Body (first 1500 characters): {{Body Plain}}

The fixed output format matters. Because the category always comes before the | character, your automation can split it out reliably and use it to pick the label.

Step 3: Build it in Zapier, Make or n8n

Zapier:

  1. Trigger: Gmail › New Email Matching Search with a search like in:inbox -from:me -label:AI so you don't re-sort mail you've already handled.
  2. Action: ChatGPT (OpenAI) › Conversation (or AI by Zapier) with the classifier prompt.
  3. Action: Formatter by Zapier › Text › Split Text on " | " to separate the category from the summary.
  4. Action: Gmail › Add Label to Email, choosing the label that matches the category (use Paths, or a Lookup Table in Formatter, to map Lead → AI/Lead and so on).
  5. Action: Filter by Zapier to continue only for Urgent or Lead, then Slack › Send Direct Message or Twilio › Send SMS to yourself with the summary.

Make: Gmail › Watch emails → OpenAI › Generate a response → Router with one route per category → a Gmail module to add the label on each route, plus a Slack › Create a Message on the Urgent and Lead routes.

n8n: n8n has a purpose-built Text Classifier node. Connect Gmail Trigger → Text Classifier (with an OpenAI chat model attached, and your six categories and descriptions entered) → one output per category → Gmail node (Add Labels) on each branch, with a Slack node on the Urgent and Lead branches. You get the branching without writing the format rules yourself.

Free template: alert message
{{Category}} from {{From Name}}: {{Summary}}. Open Gmail label AI/{{Category}}.

Step 4: Watch it for a week before trusting it

  1. Turn it on and leave your normal habits unchanged.
  2. Once a day, skim each AI label for anything in the wrong place.
  3. When something is misfiled, add a line to the prompt: "Emails from our accountant ([address]) are Billing" or "Booking confirmations from [booking tool] are FYI."
  4. After a week of clean results, start working from the labels first.

Keep it to labelling only. Don't let the automation archive, delete or mark anything as read. If it gets something wrong, the email is still sitting in your inbox.

Costs and privacy

What to do with the labels next

Sorting is the first step. Feed AI/Lead into AI lead follow-up so new inquiries get a fast first reply, and feed AI/Customer into AI email reply drafts that answer common questions from your FAQ. AI/Billing pairs naturally with automatic invoice reminders.

Want this and 11 more automations, step by step?

The Small Business Autopilot pack has 12 automations like this one, each with setup in Zapier, Make and n8n, copy-paste AI prompts, message templates and an honest time-saved estimate.

Get the pack — $19 Free 2-automation sample

Not sure where to start? Try the free automation idea finder: pick your business type and get 5 ideas.