AutomationMart
Home/Browse/Categorize and label existing Gmail emails automatically with GPT-4o mini
n8n

Categorize and label existing Gmail emails automatically with GPT-4o mini

n8nn8n14 modulesv1.0
GmailOpenAI

Categorize and Label Existing Gmail Emails Automatically with GPT-4o mini ๐Ÿ‘ฅ Who's it for This workflow is perfect for individuals or teams who want to sort and label existing emails in their Gmail inbox ๐Ÿ—ƒ๏ธ using AI. Ideal for cleaning up unlabeled emails in bulk โ€” no coding required! For sorting incoming emails messages in your gmail inbox, please use this free workflow: [Categorize and Label Incoming Gmail Emails Automatically with GPT-4o mini](

At a glance

Categorize and label existing Gmail emails automatically with GPT-4o mini is a ready-made n8n workflow you import as a workflow JSON file โ€” no build required. It connects Gmail, OpenAI. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Gmail, OpenAI
Modules
14
Price
Free
Version
v1.0
Categorize and label existing Gmail emails automatically with GPT-4o mini workflow diagram

About this workflow

Categorize and Label Existing Gmail Emails Automatically with GPT-4o mini ๐Ÿ‘ฅ Who's it for This workflow is perfect for individuals or teams who want to sort and label existing emails in their Gmail inbox ๐Ÿ—ƒ๏ธ using AI. Ideal for cleaning up unlabeled emails in bulk โ€” no coding required! For sorting incoming emails messages in your gmail inbox, please use this free workflow: Categorize and Label Incoming Gmail Emails Automatically with GPT-4o mini ๐Ÿค– What it does It manually processes a selected number of existing Gmail emails, skips those that already have labels, sends the content to an AI Agent powered by GPT-4o mini ๐Ÿง , and applies a relevant Gmail label based on the email content. All labels must already exist in Gmail. โš™๏ธ How it works โ–ถ๏ธ Manual Trigger โ€“ The workflow starts manually when you click "Execute Workflow". ๐Ÿ“ฅ Gmail Get Many Messages โ€“ Pulls a batch of existing inbox emails (default: 50). ๐Ÿšซ Filter โ€“ Skips emails that already have one or more labels. ๐Ÿง  AI Agent (GPT-4o mini) โ€“ Analyzes the content and assigns a category. ๐Ÿงพ Structured Output Parser โ€“ Converts the AI output into structured JSON. ๐Ÿ”€ Switch Node โ€“ Routes each email to the right label based on the AI result. ๐Ÿท๏ธ Gmail Nodes โ€“ Apply the correct Gmail label to the email. ๐Ÿ“‹ Requirements Gmail account connected to n8n Gmail labels must be manually created in your inbox beforehand Labels must exactly match the category names defined in the AI prompt OpenAI credentials with GPT-4o mini access n8n's AI Agent & Structured Output Parser nodes ๐Ÿ› ๏ธ How to set up In your Gmail account, create all the labels you want to use for categorizing emails Open the workflow and adjust the email fetch limit in the Gmail node (e.g., 50, 100) Confirm that the Filter skips emails that already have labels Define your categories in the AI Agent prompt โ€” these must match the Gmail labels exactly In the Switch Node, create a condition for each label/category Ensure each Gmail Label Node applies the correct existing label Save the workflow and run it manually whenever you want to organize your inbox โœ… ๐ŸŽจ How to customize the workflow Add or remove categories in the AI prompt & Switch Node Adjust the batch size of emails to process more or fewer per run Fine-tune the AI prompt to suit your inbox type (e.g., work, personal, client support)

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n โ†’ click the menu โ†’ Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Send data to Google Sheets after processing HTML with ChatGPT

Automatically process HTML data with OpenAI GPT-3, convert it to text, and send parsed information to Google Sheets for streamlined data management.

Free

AI-powered RAG Q&A chatbot with OpenAI, Google Sheets, Glide & Supabase

Automate AI-Powered RAG System with Contextual Q&A, Google Sheets Integration, and Glide Frontendโ€”Powered by n8n, OpenAI, Supabase, and Google Apps Script. Tools & Services Used Glide (Frontend for user interactions) Google Sheets (Stores questions and answers) Google Apps Script (Forms + media upload handling) OpenAI (Embeddings + GPT-4 to rank and generate answers) Supabase (Optional for image hosting) n8n (Automation logic and backend glue) Workflow Overview This automation performs the follo

Free

Create calendar events from custom webhooks using ChatGPT

Automatically create Google Calendar events from custom webhooks using ChatGPT. Streamline scheduling by responding to webhook triggers with AI-generated event details.

Free

Evaluate hybrid search for legal question-answering using Qdrant & BM25/mxbai

Evaluate Hybrid Search on Legal Dataset This is the second part of "Hybrid Search with Qdrant & n8n, Legal AI." The first part, "Indexing", covers preparing and uploading the dataset to Qdrant. Overview This pipeline demonstrates how to perform Hybrid Search on a Qdrant collection using questions and text chunks (contai

Free

Send Gmail messages with custom aliases and attachments via API

This n8n template allows you to send emails with a custom alias from your Gmail account Since the native Gmail node has some limitations regarding use of email aliases, this template allows you to set up your own internal endpoint/sub-workflow to send emails as an email alias . How it works This workflow uses a Code node and the Gmail API via an HTTP node to format the email content and send using an alias on your Gmail account. Setup instructions 1. You must have added the email address as an a

Free

๐Ÿง  Flowatch ๐Ÿ‘๏ธ analyze and diagnose n8n workflow errors via OpenAI and email

Analyze and Diagnose n8n Workflow Errors Automatically via OpenAI and Email > โš ๏ธ This template is available on โ˜๏ธ Cloud & ๐Ÿ–ฅ๏ธ self-hosted n8n instances with the OpenAI node enabled. --- ๐Ÿ‘ค Who is this for? This workflow is designed for n8n developers, automation engineers, and DevOps teams who want to automatically capture and analyze workflow errors, and receive professional HTML-styled diagnostics directly in their inbox. --- ๐Ÿ’ฅ What problem does this solve? Manually troubleshooting failed wor

Free

Evaluation metric example: Check if tool was called

AI evaluation in n8n This is a template for n8n's evaluation feature. Evaluation is a technique for getting confidence that your AI workflow performs reliably, by running a test dataset containing different inputs through the workflow. By calculating a metric (score) for each input, you can see where the workflow is performing well and where it isn't. How it works This template shows how to calculate a workflow evaluation metric: whether a specific tool was called by an agent. - We use an evalu

Free

Find competitor keyword gaps and log opportunities to Notion with DataForSEO

This workflow helps you discover new SEO content opportunities by automatically identifying keyword gaps between your website and a competing domain. On each manual run, the workflow retrieves the top 100 organically ranked keywords for your domain and for a selected competitor using the DataForSEO Labs API. It then compares both keyword lists to find valuable search terms where your competitor already has visibility on Google, but your website doesnโ€™t. For every missing keyword, the workflow ad

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint โ€” instant download
  • Setup guide PDF included
  • 5 downloads ยท valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

โ‚น2,499/ session
3 hrs ยท video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free