N8N for AI Email Labelling

Email is great and most of us can’t live without it. Somehow you’re forced to have an email for anything you do. Including finding a job.

That makes it to be overused and — sometimes it sucks. You open your inbox, see dozens of new messages, and before you even know it, you’ve spent 30 minutes just sorting through what’s important, what can wait, and what you’ll probably never read.

Wouldn’t it be better if all of that just happened on its own?

That’s exactly what you can do with n8n + AI.

ActorDo is a ready to go alternative if you’re not technical, to manage your email using AI

What is n8n (in plain words)?

Think of n8n as a big box of Lego blocks for automation. You connect one block (say Gmail), then another (like OpenAI or any AI model), then another (back to Gmail). Put them together and you’ve built a little machine that works for you.

No coding needed. Just logic.

Why use it for email labelling?

Sure, email filters exist. You can say “if the sender is X, move to folder Y.” But life’s not that simple. Sometimes the email is from a colleague, but it’s a meeting invite. Other times it’s a finance document, or just a random notification.

This is where AI changes the game. Instead of just matching keywords, the AI understands context. It knows if the email is about scheduling, money, an urgent task, or just a newsletter you’ll probably read later.

So with n8n, you glue the two together:

  • Emails come in
  • AI reads and decides what type they are
  • Labels get added automatically

How the flow looks

You don’t need to overcomplicate it. A simple version looks like this:

  1. Trigger: New email arrives in Gmail or Outlook
  2. Process: Send subject + body to an AI model
  3. Decision: AI replies with the right label (Needs Action, Meeting, Finance, Read Later, etc.)
  4. Action: Apply that label back in Gmail or Outlook

That’s it. You’ve just created your own smart inbox.

Real-life examples

This isn’t just theory. Here are a few cases that make sense:

  • Invoices → Finance
    Every time an email has payment info, receipts, or invoices, it goes into Finance. No more digging through threads.
  • Meeting invites → Calendar/Meeting
    If the AI spots Zoom, Teams, or “invite” language, the email gets tagged as Meeting.
  • Newsletters → Read Later
    Substack, Medium, LinkedIn digests—they don’t interrupt your workday. They get labelled “Read Later” and wait until you actually have time.
  • Action items → Needs Action
    If someone asks you to do something, AI marks it. That way you don’t lose track.

Why this is better than rules alone

Rules break when life gets messy. AI handles nuance. For example:

  • A subject like “Can we finalize the numbers before Friday?” → That’s “Needs Action.”
  • A subject like “Friday lunch menu” → That’s “Read Later.”

Both could come from the same sender. Rules can’t tell the difference. AI can.

Getting started

If you’ve never used n8n before, don’t worry. It’s free to start, self-hosted or cloud. You just drag-and-drop nodes like Gmail, AI, and “Add Label.” Here is the link

Start small: one workflow, one type of label. Then expand. Soon, your inbox feels like it’s running itself.

Bonus N8N workflow for email labelling (Gmail as trigger)

{
  "nodes": [
    {
      "id": "1",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1,
      "position": [250, 300],
      "parameters": {
        "triggerOn": "newEmail",
        "includeAttachments": false
      },
      "credentials": {
        "gmailOAuth2": "Your Gmail OAuth2 Credential"
      }
    },
    {
      "id": "2",
      "name": "Extract Text",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [500, 300],
      "parameters": {
        "fields": {
          "text": "={{$json[\"textPlain\"] || $json[\"textHtml\"]}}"
        }
      }
    },
    {
      "id": "3",
      "name": "AI Label Email",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [750, 300],
      "parameters": {
        "operation": "chat",
        "model": "gpt-3.5-turbo",
        "messages": [
          {
            "role": "system",
            "content": "You are an assistant that labels emails. Valid labels: Needs Action, Meeting, Finance, Read Later, Notification."
          },
          {
            "role": "user",
            "content": "Classify this email: {{$json[\"text\"]}}"
          }
        ]
      },
      "credentials": {
        "openAiApi": "Your OpenAI API Key"
      }
    },
    {
      "id": "4",
      "name": "Add Label",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 1,
      "position": [1000, 300],
      "parameters": {
        "operation": "addLabel",
        "messageId": "={{$json[\"id\"]}}",
        "labelName": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}"
      },
      "credentials": {
        "gmailOAuth2": "Your Gmail OAuth2 Credential"
      }
    }
  ],
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Extract Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text": {
      "main": [
        [
          {
            "node": "AI Label Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Label Email": {
      "main": [
        [
          {
            "node": "Add Label",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

How to use it this Email Categorization Workflow

  1. Go to your n8n instance
  2. Click Import from file/clipboard
  3. Paste the JSON above
  4. Add your Gmail + OpenAI credentials
  5. Run the workflow

Final thought

Email isn’t going away. But wasting time sorting it? That should. With n8n and AI, you’re basically giving yourself a smart assistant who works 24/7, never complains, and actually keeps your inbox clean.

Once you try it, you’ll wonder how you ever managed without it.

Hi, I’m ACTOR, designed to simplify life for busy professionals like you.

My mission is to be the best digital partner you’ve ever had—whether that’s keeping your schedule on track, managing your emails, or helping you focus on what truly matters.

Videos: getting started

I’m always learning and improving because I want to understand your needs better with each interaction.

Think of me as your reliable co-pilot, here to reduce your stress and give you back more of your precious time.
Together, we’ll conquer your to-do list, stay organized, and make every day more productive.

Let me handle the small stuff so you can focus on the big picture. Ready to make your day smoother? Let’s get started!

Try me out here