Smart Gmail Labeling Automation with Text Classifier and GPT-5
What this workflow does
This workflow automatically organizes your Gmail inbox by fetching recent emails, analyzing their content with AI, and applying the appropriate Gmail labels based on the results.
Step by step:
Schedule Trigger runs the workflow automatically at your chosen interval
Gmail Fetch retrieves the latest emails from your inbox
Loop Over Items processes each email individually
AI Text Classifier analyzes email subject and body content to determine the right category
Add Labels applies the matching Gmail label according to the AI classification
Loop Back continues until all emails are processed and organized
How to set up
Connect your Gmail account to the Gmail nodes for fetching emails and adding labels Add your OpenAI API key to the OpenAI Chat Model node for AI-powered classification Configure the schedule trigger to run at your preferred interval (default: every 5 minutes) Customize email categories in the Label Classifier node based on your organizational needs Set up Gmail labels that match your classification categories in your Gmail account Adjust the time range for fetching emails (default: last 5 minutes) and email limit (default: 10) Test the workflow with a few sample emails to ensure proper classification and labeling Monitor the workflow execution to verify emails are being processed and labeled correctly
How to customize this workflow to your needs
Adjust classification categories**: modify the Label Classifier node to include categories like "Work", "Bills", "Social", "Newsletters", or any custom categories you need Change time intervals**: customize the schedule trigger to run hourly, daily, or at specific times based on your email volume Add more label actions**: create additional Gmail label nodes for more granular categorization (urgent, follow-up, archive, etc.)
Need help customizing?
Contact me for consulting and support:
π§ billychartanto@gmail.com
Related Templates
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
π€ Build Resilient AI Workflows with Automatic GPT and Gemini Failover Chain
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works This...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments