Extract invoice data from Google Drive to Sheets with Mistral OCR and Gemini
Needs changesWhat this workflow does
This AI workflow has 20 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Google Drive, Google Sheets and Google Gemini Chat Model. It also calls api.mistral.ai over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Load files from Google Drive folder (Google Drive): work with file folder
- Get Fields Schema (Google Sheets): uses Google Sheets
- Filter processed files (Merge): merges the data from its input branches
- extract schema (Code): runs custom JavaScript code
- Download file for OCR (Google Drive): download
- Get already processed rows from Sheets (Google Sheets): uses Google Sheets
- If: checks a condition and branches into true / false
- Mistral Upload (HTTP Request): calls api.mistral.ai (POST)
- Mistral Upload (HTTP Request): calls api.mistral.ai (POST)
- Mistral Signed URL (HTTP Request): calls an HTTP API
…plus 7 more steps. See the full node list below.
Services it uses
HTTP calls to: api.mistral.ai
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Field Extractor (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Field Extractor (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Manual Trigger
n8n-nodes-base.manualTrigger - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Merge
n8n-nodes-base.merge - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
Extract data from any PDF or image invoice dropped in Google Drive directly into Google Sheets – powered by AI OCR. Free, fully modifiable n8n workflow. Optional add-ons for pro features. 🚀 What this template does Stop typing invoice data by hand. Drop a PDF…