๐ŸŽซ Categorise and label Gmail emails with GPT-4o and OpenAI

โšก 120 views ยท ๐ŸŽซ Ticket Management & Triage

Description

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

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

Prerequisites

Setup steps

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

๐Ÿ”— Nodes Used

Gmail, Gmail Trigger, Filter, OpenAI

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup