Extract invoice data from Google Drive PDFs with Mistral OCR and Sheets
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive and Google Sheets. It also calls api.mistral.ai over HTTP.
How it runs
Trigger: On Google Drive events (file created).
- Download File from Drive (Google Drive): download
- Extract Data from File (Extract from File): extracts data from a file (pdf)
- Extract Invoice Fields (Code): runs custom JavaScript code
- Append Invoice to Sheet (Google Sheets): append
- Move Processed File (Google Drive): move
- Upload File for Analysis (HTTP Request): calls api.mistral.ai (POST)
- Fetch File URL (HTTP Request): calls an HTTP API
- Obtain OCR Results (HTTP Request): calls api.mistral.ai (POST)
Services it uses
HTTP calls to: api.mistral.ai
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 (6)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Extract from File
n8n-nodes-base.extractFromFile - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow watches a Google Drive folder for new invoice PDFs, extracts key invoice fields from the document text via Mistral OCR (free), writes the structured data to Google Sheets, and then moves the processed file to a separate Google…