Route and validate emailed documents with Gmail and Google Gemini
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 HTTP webhook endpoint, and replies to the sender with an HTML confirmation email. How it works 1. Triggers when an unread Gmail message arrives from the configured sender and downloads the email attachment. 2. Uses Google Gemini to classify the
At a glance
Route and validate emailed documents with Gmail and Google Gemini is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gmail, Gemini. It's free to download. Follow the 5-step import below to go live in minutes.
- Platform
- n8n
- Connects
- Gmail, Gemini
- Modules
- 37
- Price
- Free
- Version
- v1.0

About this workflow
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 HTTP webhook endpoint, and replies to the sender with an HTML confirmation email. How it works 1. Triggers when an unread Gmail message arrives from the configured sender and downloads the email attachment. 2. Uses Google Gemini to classify the attachment as a bill of lading, invoice, warranty claim, or other, while preserving the original binary file for downstream processing. 3. Routes the flow by document type and uses Google Gemini to extract the document into a structured markdown representation. 4. Uses a dedicated Google Gemini agent per document type to convert the extracted content into JSON that matches a predefined schema. 5. Runs Python validation checks on the structured data (for example, totals matching line items) and adds a validation result to the payload. 6. Posts the structured output to a configured HTTP webhook endpoint and uses a Google Gemini messaging agent to draft an HTML reply. 7. Sends the generated reply back to the original email sender via Gmail. Setup 1. Connect a Gmail OAuth2 credential and set the Gmail trigger filters (sender, unread status) and ensure attachments are enabled for download. 2. Connect a Google Gemini (PaLM) API credential and confirm the configured Gemini models are available for both extraction and the analysis/messaging agents. 3. Update the HTTP Request node URL (and any required headers/authentication) to point to your target webhook or API endpoint. 4. Review and adjust the structured output schemas and the Python validation rules to match the fields and business rules required for your bill of lading, invoice, and warranty claim formats.
How to import this n8n workflow
- 1
Download the workflow JSON file after purchase.
- 2
Open n8n → click the menu → Import from File.
- 3
Select the downloaded JSON and import.
- 4
Set up credentials for each node that requires them.
- 5
Click Execute Workflow to test, then activate.
Setup guide
Setup guide included
Purchase to unlock the full step-by-step guide
Related N8n workflows
Map which AI search topics each domain owns with SE Ranking and GPT
Daily AI news digest with Perplexity Pro, GPT format & Gmail delivery
Insert Dynalist content from emails with a specific criteria
Automated weekly tech stack reports with BuiltWith, GPT-4o & Gmail
Send the iAuditor inspection reports to Gmail
Monitor and track brand Sentiment on Facebook Groups with Bright data
Generate structured exams from PDFs with OpenAI GPT-4o and HTML to PDF
Automate weekly SEO reports from Google Search Console to email
Reviews
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
- JSON blueprint — instant download
- Setup guide PDF included
- 5 downloads · valid 30 days
- Works with n8n
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.
- Configure live on Google Meet / Zoom
- Free follow-up if workflow has defects
- Platform expert assigned to you