Block 1 - OpenRouter Chat Model
- Type / Role
- @n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
Who is this for? Professionals and individuals who receive high volumes of emails , those who want to automatically organize their Gmail inbox using AI classification . What problem is this workflo...
@n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.aggregate, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.gmailtrigger, 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 Alex Dunlop.
Original n8n.io sourceProfessionals and individuals who receive high volumes of emails, those who want to automatically organize their Gmail inbox using AI classification.
Manual email sorting is time-consuming and inconsistent. This workflow automatically categorizes incoming emails into 8 predefined labels (To respond, FYI, Comment, Notification, Meeting update, Awaiting reply, Actioned, Marketing) to help maintain inbox zero and prioritize responses.
Before running the workflow, create these 8 labels in your Gmail account:
To change the email categories, update two places:
In the AI prompt (Basic LLM Chain node):
1. Your new category - Description of what emails fit here
2. Another category - Description
[... continue with your categories]
In Gmail labels: Create corresponding labels in your Gmail account with the exact same names and numbering.
The AI prompt contains specific rules for each category. To modify:
Currently monitors all incoming emails. To filter specific emails:
In the Gmail Trigger node, add filters such as:
from:[email protected]subject:contains-keyword-label:already-processedYou can also change this use Outlook
I choose daily for cost.
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.
| Workflow | Auto-classify Gmail emails with AI and apply labels for inbox organization |
|---|---|
| Complexity | intermediate |
| Nodes | 8 |
| Categories | Ticket Management, AI Summarization |
| Author | Alex Dunlop |
| Published | 11 Jun 2025 |
Use the JSON export at /data/workflows/4876/4876.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.
Who is this for? Professionals and individuals who receive high volumes of emails , those who want to automatically organize their Gmail inbox using AI classification . What problem is this workflo...
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.