Block 1 - Gmail Trigger
- Type / Role
- n8n-nodes-base.gmailTrigger - gmailTrigger
- Config choices
- Version 1.2
This workflow is provided as-is. Please review and test before using in production.
n8n Gmail AI Auto Labeler An intelligent n8n workflow that automatically classifies and labels Gmail emails using Google Gemini AI , keeping your inbox organized with zero manual effort. This ...
n8n-nodes-base.gmailtrigger, n8n-nodes-base.splitinbatches, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.gmailtool, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.gmail, n8n-nodes-base.code
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Muhammad Anas Farooq.
Original n8n.io source> An intelligent n8n workflow that automatically classifies and labels Gmail emails using Google Gemini AI, keeping your inbox organized with zero manual effort.
This workflow uses AI-powered classification to analyze email content, learn from sender patterns, and automatically apply appropriate labels while archiving processed emails.
{
"label": "Category Name"
}
Or "None" if no category fits.Import the Workflow:
Create Gmail Labels:
Get Your Label IDs:
Label_1234567890123456789).Update Code Nodes with Your Label IDs:
Node 1: "Check Label Existence"
const labelMap = {
"Label_YOUR_ID_HERE": "Meetings",
"Label_YOUR_ID_HERE": "Inquiries",
"Label_YOUR_ID_HERE": "Notify / Verify",
"Label_YOUR_ID_HERE": "Expenses",
"Label_YOUR_ID_HERE": "Orders / Deliveries",
"Label_YOUR_ID_HERE": "Trash Likely"
};
Node 2: "Convert Label to Label ID"
const labelToId = {
"Meetings": "Label_YOUR_ID_HERE",
"Inquiries": "Label_YOUR_ID_HERE",
"Notify / Verify": "Label_YOUR_ID_HERE",
"Expenses": "Label_YOUR_ID_HERE",
"Orders / Deliveries": "Label_YOUR_ID_HERE",
"Trash Likely": "Label_YOUR_ID_HERE"
};
Set Up Credentials:
Test the Workflow:
Activate for Auto Mode:
Dual Execution Modes:
AI Learning from Patterns:
Skip Already Labeled Emails:
Structured AI Output:
{ "label": "Category" }.{ "label": "None" } and the email stays in inbox.Background Archiving:
Rate Limits:
| Label | Description |
|---|---|
| Meetings | Calendar invites, Zoom/Meet links, appointments, scheduled events |
| Expenses | Bills, invoices, receipts, payment reminders, subscription renewals |
| Income | Payments received, payouts, deposits, earnings notifications |
| Notify / Verify | Verification codes, login alerts, 2FA codes, account notifications |
| Orders / Deliveries | Order confirmations, shipping updates, tracking numbers, deliveries |
| Inquiries | Business outreach, sales proposals, partnerships, cold emails |
| Trash Likely | Spam, newsletters, promotions, marketing blasts, ads |
> If no category fits clearly, the email returns "None" and remains in the inbox.
pollTimes → mode (e.g., every5Minutes).limit: 10 in "Get many messages" node for manual bulk processing.limit: 10 in Gmail tool nodes to fetch more historical data.Author: Muhammad Anas Farooq
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.
| Workflow | Smart Gmail auto-labeler with Gemini AI & sender history |
|---|---|
| Complexity | advanced |
| Nodes | 25 |
| Categories | Ticket Management, AI Summarization |
| Author | Muhammad Anas Farooq |
| Published | 05 Dec 2025 |
Use the JSON export at /data/workflows/11518/11518.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
n8n Gmail AI Auto Labeler An intelligent n8n workflow that automatically classifies and labels Gmail emails using Google Gemini AI , keeping your inbox organized with zero manual effort. This ...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Summarization use case.