Templates / Route and validate emailed documents with Gmail and Google Gemini

Route and validate emailed documents with Gmail and Google Gemini

Ready for 3.0

by David Grimm ✓ · 37 views · created 2026-06-08 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. Analyze Document with Gemini (Google Gemini): work with document
  2. Merge: merges the data from its input branches
  3. Switch: routes items into 3 branches
  4. Analyze Bill Of Laden (Google Gemini): work with document
  5. Analyze Invoice (Google Gemini): work with document
  6. Analyze Warranty Claim (Google Gemini): work with document
  7. 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
  8. AI Invoice Analyzer Agent (AI Agent): runs an AI agent, with model: Gemini Main Analysis, Gemini Fallback Analysis; output parser: Parse Structured Output
  9. AI Warranty Analyzer Agent (AI Agent): runs an AI agent, with model: Gemini Main Analysis, Gemini Fallback Analysis; output parser: Parse Structured Output
  10. Validate Bill Of Laden (Code): runs custom Python code

…plus 8 more steps. See the full node list below.

Services it uses

GmailGoogle GeminiGoogle Gemini Chat Model

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)

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…

Excerpt from David Grimm's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.