ObserveAutomation

Auto-labelling emails using AI and n8n

October 21, 2025

Auto-labelling emails using AI and n8n

I spend too long every day labelling (or categorising, if you prefer) the many emails I receive. There has to be a better way!

An automation could automatically read my emails and decide how to label them for me… and more

Auto-labelling emails

As with most projects, this one started with the realisation that I spent too much time sorting my emails every day and that, once in a while, I would miss an important email due to the large number of emails I get daily.

Before jumping deep into the design, I first listed my “requirements” for an automated solution:

An analysis of the requirements allowed me to confirm that all of the requirements can be achieved by using le low-code n8n and some external integrations/tools (Gmail, GSheets, Anthropic for the AI).

Thus we have this high-level flow:

Alt

I wanted the user to be able to update the configuration without having to learn n8n, so I placed the configuration items (emails to exclude, those to mark as advertisers and the labels to use) in a Google Sheet that they can access through their browser. It’s an interface they’re used to so they adapted very quickly.

I extended the automation to create draft replies to emails if required (but disabled that). By placing the replies in the drafts means that nothing leaves the desk without having been viewed/checked by a human!

Here’s the final n8n workflow with annotations:

Alt

What does it cost?

The n8n server is running on my own homelab, so other than electrity, there’s no direct cost for automation.

The analysis of the job role is done by an LLM in the cloud: Anthropic Clause-3.5-sonnet (via APIs) which is fast but not cheap. I have tried cheaper models but didn’t get the consistency in the labelling I wanted. Looking at my OpenRouter API balance I can see that each email processed costs between £0.01 and £0.10 (long and complex email conversations).