Route and validate emailed documents with Gmail and Google Gemini
Ready for 3.0What this workflow does
This AI workflow has 37 nodes and runs on Gmail events. Along the way it connects Gmail, Google Gemini and Google Gemini Chat Model. It also calls webhook.site over HTTP.
How it runs
Trigger: On Gmail events.
- Analyze Document with Gemini (Google Gemini): work with document
- Merge: merges the data from its input branches
- Switch: routes items into 3 branches
- Analyze Bill Of Laden (Google Gemini): work with document
- Analyze Invoice (Google Gemini): work with document
- Analyze Warranty Claim (Google Gemini): work with document
- AI Bill Of Laden Analyzer Agent (AI Agent): runs an AI agent, with model: Gemini Main Analysis, Gemini Fallback Analysis; output parser: Parse Structured Output
- AI Invoice Analyzer Agent (AI Agent): runs an AI agent, with model: Gemini Main Analysis, Gemini Fallback Analysis; output parser: Parse Structured Output
- AI Warranty Analyzer Agent (AI Agent): runs an AI agent, with model: Gemini Main Analysis, Gemini Fallback Analysis; output parser: Parse Structured Output
- Validate Bill Of Laden (Code): runs custom Python code
…plus 8 more steps. See the full node list below.
Services it uses
HTTP calls to: webhook.site
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 (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - HTTP Request
n8n-nodes-base.httpRequest - Gmail Tool
n8n-nodes-base.gmailTool - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - AI Agent
@n8n/n8n-nodes-langchain.agent - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code
From the author
Quick Overview This workflow monitors Gmail for unread emails from a specific sender, classifies attached documents with Google Gemini, then extracts and validates structured data for bills of lading, invoices, and warranty claims, posts the results to an…