Auto-Label Gmail Messages with Custom Categories Using GPT-4 Mini
**Why settle for Gmail's default tabs when AI can sort your inbox your way?** ### Who is this for? Job seekers, freelancers, and students who receive job-related emails and want them auto-sorted into labels. ### Use case - **Problem**: Job emails get buried. Manually reading, labeling, and tracking them in a sheet is error-prone and time-consuming. - **Use Case**: An n8n workflow that fetches new Gmail messages on a schedule, classifies them with OpenAI, and adds customized Gmail labels defined by the user. ### What this workflow does? 1. Runs on a **schedule (Cron)** to fetch new Gmail messages. 2. Uses OpenAI to classify each email into: **Job Opportunity, Application Status, Enquiries, or Others** (you can edit categories). 3. **Adds Gmail labels** accordingly (auto-creates them if missing). ### Prerequisites - n8n (Cloud or self-hosted). - Credentials set up in n8n: - Gmail OAuth - OpenAI (API key) ### Setup - Import the **JSON** (below) into n8n. - Open **Credentials** for Gmail, OpenAI. - In the **OpenAI node**, pick your model (e.g., gpt-4o-mini or any GPT-4 class model). - In the Gmail Add Labels nodes, confirm/adjust label names: - **Job Opportunity**, **Application Status, Enquiries, Others** ### How to customize it for your needs - Add a Follow-Up Date parser (e.g., “We'll get back in 2 weeks”) — push to Calendar. - Extend categories (e.g., **Interview Invite, Offer, Rejection, HR Enquiry**). - Threaded Gmail Draft Reply for Enquiries using a template. ### Troubleshooting - **No items flowing?** Check Gmail scope/label filters and Cron timing. - **Labels not created?** The Gmail node can create them; ensure the label names match exactly. ### Why Use This Template? Gmail can classify messages into Spam, Promotions, or Social, but have you ever wished you could sort emails **your own way**? With this AI-powered workflow, you can create **custom categories** that fit your needs - like **Job Opportunity, Application Status, or Enquiries** - so you never lose track of what matters. ### Need Assistance? For setup guidance, customization, or business inquiries, email: phoenixaiagentsolutions@gmail.com
Why settle for Gmail's default tabs when AI can sort your inbox your way?
Who is this for?
Job seekers, freelancers, and students who receive job-related emails and want them auto-sorted into labels.
Use case
-
Problem: Job emails get buried. Manually reading, labeling, and tracking them in a sheet is error-prone and time-consuming.
-
Use Case: An n8n workflow that fetches new Gmail messages on a schedule, classifies them with OpenAI, and adds customized Gmail labels defined by the user.
What this workflow does?
- Runs on a schedule (Cron) to fetch new Gmail messages.
- Uses OpenAI to classify each email into: Job Opportunity, Application Status, Enquiries, or Others (you can edit categories).
- Adds Gmail labels accordingly (auto-creates them if missing).
Prerequisites
- n8n (Cloud or self-hosted).
- Credentials set up in n8n:
- Gmail OAuth
- OpenAI (API key)
Setup
- Import the JSON (below) into n8n.
- Open Credentials for Gmail, OpenAI.
- In the OpenAI node, pick your model (e.g., gpt-4o-mini or any GPT-4 class model).
- In the Gmail Add Labels nodes, confirm/adjust label names:
- Job Opportunity, Application Status, Enquiries, Others
How to customize it for your needs
-
Add a Follow-Up Date parser (e.g., “We'll get back in 2 weeks”) — push to Calendar.
-
Extend categories (e.g., Interview Invite, Offer, Rejection, HR Enquiry).
-
Threaded Gmail Draft Reply for Enquiries using a template.
Troubleshooting
-
No items flowing? Check Gmail scope/label filters and Cron timing.
-
Labels not created? The Gmail node can create them; ensure the label names match exactly.
Why Use This Template?
Gmail can classify messages into Spam, Promotions, or Social, but have you ever wished you could sort emails your own way?
With this AI-powered workflow, you can create custom categories that fit your needs - like Job Opportunity, Application Status, or Enquiries - so you never lose track of what matters.
Need Assistance?
For setup guidance, customization, or business inquiries, email: phoenixaiagentsolutions@gmail.com
New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.
Secure checkout powered by Stripe
Support
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Communication workflows
- Automate Outbound Calls with Ultravox AI and Twilio$4.99
- Automate Intelligent Email Classification with AI in Gmail$4.99
- Generate AI videos and carousels with Blotato for Instagram and TikTok$9.99
- Automating WhatsApp Replies Using GoHighLevel with Redis and Anthropic$24.99
- Automate Gmail Email Labeling with AI for Enhanced Organization$14.99
- Automate Email Summarization and Logging with AI and Google Sheets$9.99
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.