Label Gmail emails with Google Gemini
Gemini classifies each new Gmail email and applies the matching label. This n8n template watches a Gmail inbox with the Gmail Trigger node, which detects every new incoming email. A Text Classifier node, backed by the Google Gemini Chat Model or another LLM, reads the email content and picks a category. The workflow then adds the matching label to the email in Gmail. Setup needs two connections: your Gmail account and your Google Gemini or other LLM credentials. It is for people who sort their Gmail inbox with labels.
Steps
- Trigger: Gmail trigger detects each new emailGmail
- Text Classifier sorts it into categories
- Google Gemini powers the classificationGoogle Gemini
- Conditional labeling by category
High Priority, Work Related, Promotions. - Output: Gmail adds the correct labelGmail
Limits
- Gmail only.
- Labels only; it sends no reply and no alert.
What it does well
- Needs only two connections: Gmail and an LLM.
- Works with Gemini or another LLM model.
Before you import
Connect your Gmail account and your Google Gemini (or other LLM) credentials to n8n after the import.
Similar templates
Support tickets: AI reply or escalate
Also for customer support, 9 steps.
Gmail triage and drafts with Claude
Also for customer support, 8 steps.
Region-aware Gmail support replies
Also for customer support, 10 steps.
Gmail and Google Gemini: 11 templates compared
Same two apps, different steps.
Sort incoming requests
Other templates that do this task.