Categorise and label Gmail emails with GPT-4o and OpenAI

Automatically organise your Gmail inbox using AI. This workflow categorises every incoming email and applies Gmail labels, keeping only important emails in your inbox while filing everything else automatically.

Who is this for?
Anyone overwhelmed by email clutter who wants inbox zero without manual sorting.

How it works
Gmail Trigger polls your inbox for new emails every minute
AI Categorisation (GPT-4o) analyses each email and assigns a category such as Action Required, Newsletters, Sales Pitches, Client Communication, Receipts, and more
Filter checks if the email requires your attention or can be auto-filed
Label Management removes non-actionable emails from inbox and applies the appropriate Gmail label

Prerequisites
Gmail account with OAuth2 access
OpenAI API key
Gmail labels created for each category you want to use

Setup steps
Import the workflow and connect your Gmail OAuth2 credentials
Add your OpenAI API key
Create Gmail labels matching your categories such as Action Required, Newsletters, People Selling Me Stuff, Admin/Receipts
Run the Get many labels node manually to retrieve your label IDs
Update the Add to folder node with your label ID mapping using the example in the pink sticky note
Customise the AI prompt categories to match your workflow needs
Test with a few emails before activating

0
Downloads
0
Views
7.33
Quality Score
beginner
Complexity
Author:Zac Nielsen(View Original →)
Created:2/14/2026
Updated:2/14/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments