Categorize and track company emails with OpenRouter AI and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 10 nodes and runs when a new email arrives over IMAP. Along the way it connects Google Sheets, AI Agent, OpenRouter Chat Model and Structured Output Parser.
How it runs
Trigger: When a new email arrives over IMAP.
- Get row(s) in sheet (Google Sheets): uses Google Sheets
- AI Agent: runs an AI agent, with model: oAI OSS; output parser: Category & Request
- Find Category (Google Sheets): uses Google Sheets
- If: checks a condition and branches into true / false
- Edit Fields (Edit Fields (Set)): sets or maps fields
- Append row in sheet (Google Sheets): uses Google Sheets
- Update Request Count (Google Sheets): uses Google Sheets
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Email Trigger (IMAP)
n8n-nodes-base.emailReadImap - Google Sheets
n8n-nodes-base.googleSheets - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
How it works Watches inbox for new emails via IMAP. Fetches existing categories and requests from Google Sheets. Uses AI to analyze subject and body, then assigns a category and request type. Checks if the same category/request already exists in the sheet. If…