Most small businesses face a common challenge: a cluttered email inbox where everything is mixed together. This makes it easy to get distracted and difficult to prioritize important messages. But what if you could transform your inbox with automated categorization and color coding using AI? What if your inbox could feel less chaotic and more manageable, helping you focus on what truly matters?

In this guide, I’ll show you exactly how to set up an AI-powered email categorization system customized to your workflow using an automation tool called n8n. The best part? It only takes about 10 minutes to get started. Whether you’re looking to simply organize your inbox or take it a step further with multiple inboxes within Gmail itself, this method will help you regain control over your email.

My name is Milan from Smoothwork, where we help companies streamline and automate processes like email management. If you want to have this for yourself, check out and follow along with the n8n workflow template.

Table of Contents

The Problem: Messy Inboxes in Small Businesses

Many small businesses have an email inbox that looks like a chaotic mess – everything jumbled together without any clear order. This setup makes it extremely hard to prioritize emails, respond promptly, and stay focused on critical communications.

Here’s what a typical small business inbox looks like:

Messy email inbox with mixed emails

Everything is mixed, making it easy to get distracted and hard to know what needs your immediate attention.

But with the right automation, you can start to organize your inbox like this:

Email inbox with automated categorization and color coding

This is a big step forward – emails are categorized and color-coded automatically, making it easier to scan and prioritize. And if you want to push organization even further, you can set up multiple inboxes within your Gmail interface, like this:

Gmail with multiple inboxes feature enabled

This setup divides your inbox into sections based on categories, giving you a clear overview of different types of emails at a glance.

Getting Started with the AI Email Organizer

To build this system, we’ll use an automation workflow built on n8n, which is a powerful automation tool that connects apps and services without coding. You can find the link to the free n8n workflow template in the description.

Here’s how to get started:

  1. Click the link in the description to open the n8n workflow template.
  2. Click on Use for free.
  3. If you already have an n8n account, you will be prompted to log in. If not, I recommend starting with the cloud version, which is the easiest way to get started.
  4. If you later want to self-host n8n, you can switch easily, but self-hosting requires some setup and experimentation, so I suggest trying the cloud trial version first.

n8n workflow template screen

Once your account is set up, the workflow template will be added to your workspace.

Customizing Your Email Categories with Google Sheets

The workflow relies on a Google Sheet to define the categories that the AI will use to classify your emails. You’ll find this Google Sheet linked in the workflow instructions.

To customize:

  1. Open the Google Sheet.
  2. Go to File > Make a copy to save it to your own Google Drive. This will allow you to edit it.
  3. Edit the categories as needed to reflect the types of emails your business receives.

Google Sheet with email categories

For example, if you want to add a new category for “Existing Order Questions,” you can add it like this:

  • Category Name: Existing Order Questions
  • Definition: Emails from existing customers about an order they have placed, such as delivery dates or order status.

Adding detailed definitions helps the AI correctly assign emails to the right category.

After customizing your categories, copy the URL of your copied Google Sheet and paste it into the n8n workflow configuration. This ensures the workflow pulls the correct category data.

n8n config node with Google Sheet URL

Getting Your OpenRouter API Key

This workflow uses AI via the OpenRouter API. To connect it, you’ll need to generate an API key from OpenRouter:

  1. Go to the OpenRouter website.
  2. Log in with your Google account or another supported login method.
  3. Navigate to the API keys section and create a new key.
  4. Name it anything you like, then copy the generated key.

OpenRouter API keys screen

Be sure to save this key somewhere safe because you won’t be able to see it again after you leave the page. You can always create a new key if needed, but it’s easier to keep this one secure.

Testing and Activating Your AI Email Organizer

With your categories set and API key added, you’re ready to test the automation.

Connect the workflow to your Gmail inbox and click “Test Workflow.” The AI will process your recent emails and categorize them based on the definitions you provided.

Testing the n8n workflow with sample emails

This process can take a few minutes as the AI analyzes each email.

Once complete, check your inbox labels—you should see new labels applied automatically, and any missing labels will be created by the workflow.

Inbox with AI-generated labels

Scheduling Automatic Runs

To keep your inbox organized continuously, you need to activate the workflow and schedule it to run regularly.

In the n8n editor, switch the workflow status from Inactive to Active.

Then configure the schedule trigger node at the start of the workflow. For example, set it to run once every hour.

Running the workflow hourly is a reasonable default, but you can adjust this based on your email volume and n8n plan limits.

To optimize usage and reduce run counts, you can use cron expressions to limit runs to business hours or weekdays only. crontab.guru is a great tool to build cron expressions, that you can use to change the schedule.

Organizing Gmail Labels and Colors

Once the automation is running, Gmail will have multiple labels created by the workflow. To make it visually easier to spot important emails, you can customize the label colors.

For example, set the “Customer Complaints” label to orange for easy identification.

Changing Gmail label colors

Color coding your labels helps you quickly scan your inbox and find urgent or important emails.

Using Gmail’s Multiple Inboxes Feature for Better Organization

To take your email organization even further, Gmail offers a Multiple Inboxes feature. This allows you to divide your inbox into several sections, each showing emails from specific categories or labels.

Here’s how to set it up:

  1. Click the Settings gear icon in Gmail (top right).
  2. Go to See all settings.
  3. Navigate to the Inbox tab.
  4. Find the Multiple Inboxes option and select it.

Gmail settings for multiple inboxes

The UI will change to show multiple inbox panes below your main inbox.

Next, customize each pane by setting a section name and a search query. For example, you might create sections like:

  • Important: Search query: in:inbox label:customer-complaints OR label:urgent-emails
  • Orders: Search query: in:inbox label:existing-order-questions
  • Support: Search query: in:inbox label:support-requests

Including in:inbox in the search query ensures archived emails don’t appear in these sections.

Save your changes, and your inbox will now display grouped sections for each category, with color-coded labels inside them.

Gmail inbox with multiple inbox sections

If you archive an email, it will disappear from both the full inbox and these multiple inbox sections, keeping your view clean.

Further Automation Possibilities

This AI Email Organizer setup is just the beginning. Here are some advanced ideas to improve your email workflow even more:

  • Automatic Replies: Send quick RSVP messages or set expectations for reply times on common queries.
  • Draft Replies: Use AI to generate suggested responses based on a knowledge base included in your prompts. You can review and approve drafts before sending.
  • Real-Time Processing: Trigger the workflow immediately when a new email arrives using IMAP nodes. This setup requires extra configuration but can make your system even more responsive.
  • Other Providers: While this example uses Gmail, you can adapt the workflow for Outlook or other email services by swapping Gmail nodes with Outlook nodes or equivalents.

If you’re interested in tutorials on any of these advanced features, feel free to leave a comment or reach out.

Conclusion

Managing your email inbox effectively is a game-changer for productivity, especially for small businesses that rely on timely communication. Using AI to automatically categorize, color code, and organize your emails can save you hours of manual sorting and help you focus on what matters most.

With this simple n8n workflow, you can have an AI Email Organizer up and running in about 10 minutes, tailored to your specific email categories. The added Gmail multiple inboxes setup further enhances your ability to stay organized and efficient.

I encourage you to try out this system, customize it to your needs, and take control of your inbox once and for all.

If you want to explore more automation and process streamlining solutions, check out Smoothwork and consider booking a free consultation.

Happy organizing!

Try out the free n8n template!

Get your gmail organized in minutes.

Go to template

FAQ: AI Email Organizer

What is an AI Email Organizer?

An AI Email Organizer is a system that uses artificial intelligence to automatically categorize and label your incoming emails. It helps sort your inbox by topics, urgency, or other custom categories, saving you time and improving productivity.

How does this AI Email Organizer work?

This setup uses the automation tool n8n combined with AI (via OpenRouter API) to analyze your emails based on custom definitions you provide in a Google Sheet. The AI assigns labels to emails, which Gmail then uses to categorize and color code your inbox.

Is this system free to use?

The n8n workflow template is free to duplicate and use. n8n offers a free trial for its cloud service, which is recommended for easy setup. OpenRouter API may have usage limits depending on your plan. Gmail and Google Sheets are free services.

Can I customize the email categories?

Yes! You can fully customize the categories and their definitions in the Google Sheet to match the types of emails your business receives.

Does this work with email providers other than Gmail?

The example provided is designed for Gmail. However, with some adjustments, the workflow can be adapted for Outlook or other providers by replacing the Gmail-specific nodes with appropriate equivalents.

Can this system automatically reply to emails?

Automatic replies and draft generation are possible extensions of this workflow but are not included in the basic template. These features can be added using AI to draft responses based on a knowledge base.

How often does the workflow run?

You can schedule the workflow to run at intervals that suit your needs, such as every hour during workdays. This is configurable in the n8n scheduler node.

Is it difficult to set up?

The basic setup takes about 10 minutes and requires minimal technical knowledge. Advanced features like real-time email processing using IMAP triggers require more configuration.

Author