image 109

Automate Your Inbox with AI: Never Sort Emails Again

The Email Apocalypse: A Story

Meet Sarah. She’s a brilliant founder running a 7-person startup. Every morning, she opens her laptop to a digital war zone: 317 new emails. Investor updates. Customer complaints. A spam email offering “viable crypto deals.” Her assistant, Mike, tries to sort them, but he’s human. He makes mistakes. He gets tired. Sometimes, he’s sick. Sarah wastes hours triaging, her team waits for critical leads, and chaos reigns. This isn’t productivity. It’s digital whack-a-mole.

You, dear reader, have a Sarah inside your inbox. Maybe it’s you. Your employee. Your freelancer. Let’s replace that chaotic human process with a calm, intelligent automation that sorts, routes, and acts.

Why This Matters: The 10-Hour Weekly Tax

Email sorting is a non-revenue task that consumes a living wage. The average professional spends 6.4 hours per day managing email. We’re not talking about sending thoughtful replies; we’re talking about the *triage*—the “Is this urgent? Who handles this? Is this junk?” loop.

This automation does the work of an intern who:

  1. Reads every single email
  2. Identifies the sender and intent
  3. Tags it with the right priority (Urgent, Info, Ignore)
  4. Assigns it to the correct person in your team
  5. Sends a brief, formatted summary to a Slack channel for awareness

The business outcome: Faster response times to critical clients, less founder burnout, and a team that only sees what they need to see.

What This Tool / Workflow Actually Is

We’re building an “Email Brain” system using Make.com (a no-code automation tool) and a simple AI model via OpenAI’s API. Here’s the blueprint:

  • Trigger: A new email lands in a specific Gmail label (e.g., “Needs Sorting”).
  • Brain: The AI reads the email content and sender, then decides: Category (Support, Sales, Legal, Spam) and Priority (High, Medium, Low).
  • Act: The system moves the email to the correct label, tags the sender in your CRM, or posts a summary to Slack.

What it is NOT: A magic button that writes perfect email replies (though we’ll cover that later in the course). It’s a classifier and a router. It’s the sorting mechanism, not the finishing touches.

Prerequisites: No Code, No Panic

Before you start:

  1. A Google/Gmail Account. You’ll need a label for unsorted mail (create one called “Needs Sorting”).
  2. A free Make.com account. It’s like digital superglue for apps. They give you 1,000 operations/month for free—enough for a small business.
  3. An OpenAI API Key. Sign up at platform.openai.com, buy $5 of credits (it’s cheap), and get your secret key. Protect it like a password.

If you’re nervous about APIs, don’t be. We’re just going to plug in a URL and paste a key. You’ll be fine.

Step-by-Step Tutorial: Building the Email Brain

We’ll do this in Make.com. Think of it as building a pipeline. Data flows from trigger to AI to action.

Step 1: Create a New Scenario in Make.com

1. Log into Make.com and click “Create a new scenario.”
2. In the trigger module, search for “Gmail.” Select the “Watch Emails” module.
3. Connect your Gmail account (Make will prompt you to authorize it).
4. In the settings for this module:
– Select your specific email address.
– Set “Filter” to “Label: Needs Sorting” (this is our inbox’s ‘on-ramp’).
– We only want to process NEW emails, so set “Limit” to 1 and enable “Process emails as events”.

Step 2: Send Email Data to the AI Brain

1. Add a new module. Search for “HTTP” and select “Make a request.”
2. Configure the request:
URL: https://api.openai.com/v1/chat/completions
Method: POST
Headers: Add a key Authorization with value Bearer sk-YOUR_API_KEY_HERE (replace with your real key). Add a second key: Content-Type with value application/json
Body: Select “Raw” and paste this JSON. We’ll make it dynamic using Make’s variables.

{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
      "role": "system",
      "content": "You are a ruthless email sorter for a startup. Your job is to analyze incoming emails and output ONLY a valid JSON object with these fields: {\\"category\\": \\"Support, Sales, Legal, or Spam\\", \\"priority\\": \\"High, Medium, or Low\\"}. Use the sender and body text to decide. Do not add extra text."
    },
    {
      "role": "user",
      "content": "From: {{1.from}} Subject: {{1.subject}} Body: {{1.snippet}}"
    }
  ],
  "max_tokens": 100
}

Explanation: The `{{1.from}}` and others are Make’s dynamic tokens from the Gmail module. This tells the AI: “Read this email and categorize it.”

Step 3: Parse the AI’s JSON Response

1. Add a new module: “Tools” > “JSON Parse.”
2. In the “JSON Input” field, select the “Body” output from the previous HTTP module. This turns the AI’s raw text response into usable data for the next steps.

Step 4: Route Based on Category & Priority

Here’s the logic magic. Use Make’s “Router” module.

  1. Add a “Router.” Connect it to the “JSON Parse” module’s output.
  2. For each branch, add a filter. Example for “High-Priority Sales”:
    – Filter 1: `category` (from JSON) `equals` `Sales` AND `priority` (from JSON) `equals` `High`.
  3. For each branch, add an action. Examples:
    – For a high-priority sales email: Add a “Slack” module to post a message to the #sales-urgent channel.
    – For a support email: Add a “Gmail” module to move the email to the “Support” label.
    – For spam: Add a “Gmail” module to mark it as spam or trash it.

Repeat for other combos (Low-Priority Support, Medium-Priority Legal, etc.). You can start with just 2-3 rules and expand.

Step 5: Test and Activate

1. Save your scenario.
2. Click “Run Once.” Send a test email to your account with the “Needs Sorting” label (e.g., “URGENT: Client meeting request”).
3. Watch the data flow through the modules in Make’s visual interface. If it works, you’ll see your Slack notification or the email move labels.
4. If it fails, click the module to see the error logs. Common issue: API key format in headers.

Once tested, turn the switch to “ON” and go to sleep. Your robot is now working the night shift.

Complete Automation Example: The Urgent Client Crisis

**Scenario:** A key client’s website crashes. They email at 2 AM from the address ceo@clientco.com with the subject “URGENT: Site Down!” and the body “Our entire checkout page is broken. Revenues halting. Call me NOW.”

**How Your Automation Handles It:**

  1. Trigger: Email arrives. Make.com spots it because it’s in the “Needs Sorting” label (you’ve trained your team to forward urgent emails there).
  2. AI Brain Analysis: The AI gets the sender, subject, and snippet. It sees “URGENT,” “clientco.com” (a known partner), and words like “crisis” and “revenue halting.” It outputs: {"category": "Support", "priority": "High"}.
  3. Routing Logic: The router matches “Support” + “High.” It executes the action branch for that combo.
  4. Actions Taken:
    – The email is automatically moved from “Needs Sorting” to the “High-Priority Support” label in Gmail.
    – A Slack message is posted to the #support-urgent channel: “🚨 HIGH PRIORITY SUPPORT: – ‘URGENT: Site Down!’ Review immediately.”
    – Simultaneously, a task is created in your project management tool (e.g., Asana or Trello) via another Make module, assigned to your lead developer.

**Result:** Your founder wakes up to a clean, prioritized inbox. The team gets a notification at 2:05 AM. The client feels heard because the right person is on it. You saved the relationship without even touching your laptop.

Real Business Use Cases (Beyond Founders)
  1. The E-commerce Store Owner: Problem: Mixing customer refund requests with supplier invoices. Solution: Route “Refund” emails to customer service and “Invoice” emails to the accounting folder in Google Drive.
  2. The Freelance Consultant: Problem: New leads buried under project updates and contracts. Solution: Tag “Lead” emails with a high priority and send a summary to your lead-tracking spreadsheet (via Make’s Google Sheets module).
  3. The Non-Profit Director: Problem: Volunteer sign-ups lost among donation receipts. Solution: Auto-tag “Volunteer” emails and add the sender to your volunteer mailing list in Mailchimp.
  4. The Real Estate Agency: Problem: Inquiries about rentals vs. sales get mixed. Solution: Use keywords like “rent” or “buy” in the AI prompt to route to the correct team’s calendar for follow-up calls.
  5. The Restaurant Chain Manager: Problem: Catering requests mixed with daily staff schedules. Solution: Auto-assign catering emails to the events coordinator and staff schedule emails to the GM’s email label.
Common Mistakes & Gotchas
  1. Vague Prompts: The AI is only as smart as its instructions. If you say “Sort this email,” it will fail. Be explicit: “Output ONLY valid JSON with these fields…”
  2. API Costs: GPT-3.5 is cheap, but if you process 10,000 emails a month, it adds up. Monitor your OpenAI usage and consider setting a monthly cap.
  3. False Positives: The AI might misclassify a sarcastic email from a friend as “Spam.” Start by only applying actions to emails from trusted domains (add a filter for known clients).
  4. Label Overload: Don’t create 50 email labels. Start with 5 core ones: “Needs Sorting,” “Support,” “Sales,” “Legal,” “Spam.” Let the automation manage the rest.
How This Fits Into a Bigger Automation System

This Email Brain is a single node in a larger network. It’s the first mile of the data highway. After classification, here’s what it can connect to:

  • CRM: A “Sales” email can auto-create a lead in HubSpot or Salesforce.
  • Voice Agents: Imagine a voice AI agent that reads you the summary of “High-Priority” emails during your morning commute (we’ll build this in a future lesson).
  • Multi-Agent Workflows: The classified email could trigger a separate agent to draft a first response in your brand’s voice, which you simply approve.
  • RAG Systems: A “Support” email could automatically search your company knowledge base for relevant troubleshooting docs and attach them to the case.

This automation is your digital mailroom. Once the mail is sorted, the real work—answering, deciding, creating—can begin efficiently.

What to Learn Next: The Reply Bot

You’ve just hired a robot intern. Now, let’s teach it to write. In the next lesson, we’ll build on this exact automation to draft intelligent, context-aware email replies based on the AI’s classification. No more blank page syndrome for common requests.

You are now two steps closer to a fully automated office. Your inbox is quiet. Your team is focused. The chaos has a system.

Keep building,
Professor Ajay

“,
“seo_tags”: “AI email automation, business automation, workflow automation, Make.com tutorial, OpenAI API, email sorting, productivity hacks”,
“suggested_category”: “AI Automation Courses

Leave a Comment

Your email address will not be published. Required fields are marked *