Extract and validate invoice data from Google Drive using OCR.Space, Gemini, and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive, Google Gemini, Gmail and Google Sheets. It also calls api.ocr.space over HTTP.
How it runs
Trigger: On Google Drive events (file created).
- Download Invoice File (Google Drive): download
- Validate Supported File Type (If): checks a condition and branches into true / false
- Extract Invoice Text (OCR) (HTTP Request): calls api.ocr.space (POST)
- Check OCR Processing Status (If): checks a condition and branches into true / false
- AI Invoice Data Extraction (Google Gemini): uses Google Gemini
- Validate Extracted Invoice Data (Code): runs custom JavaScript code
- Check Missing Invoice Fields (If): checks a condition and branches into true / false
- Send Manual Review Alert (Gmail): uses Gmail
- Store Invoice Data (Google Sheets): append
- Send Processing Confirmation (Gmail): uses Gmail
Services it uses
HTTP calls to: api.ocr.space
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 (8)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow monitors a Google Drive folder for newly uploaded invoice files, extracts text with OCR.Space, uses Google Gemini to convert the OCR text into structured invoice fields, validates required values, then stores results in Google…