Extract invoice data from Google Drive PDFs with Mistral OCR and Sheets

Go to Workflow
0 views
Built by Tim Kramny Tim Kramny
Created on September 10, 2026

Description

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 Drive folder.

How it works
Triggers every minute when a new file is created in a specific Google Drive folder.
Downloads the newly uploaded PDF from Google Drive.
Extracts text content from the PDF. Use Mistral OCR for better results, free API keys are available.
Parses the extracted text to identify invoice details like invoice number, issue date, due date, customer/seller, amounts, and days left to pay.
Appends the extracted invoice fields as a new row in a Google Sheets spreadsheet and marks the invoice as unpaid.
Moves the processed PDF into a “Processed Invoices” Google Drive folder.

Setup
Connect your Google Drive OAuth2 credentials and set the source “UPLOAD Invoices” folder ID and destination “Processed Invoices” folder ID.
Connect your Google Sheets OAuth2 credentials and set the target spreadsheet and sheet tab, ensuring the columns match the fields being written.
Create a Mistral API key and input that Bearer token in the three HTTP calls to Mistral for the request to succeed.
Upload PDF invoices with consistent formatting to improve extraction accuracy, or replace the built-in PDF text extraction with the included Mistral OCR HTTP requests and add your Mistral API key as an HTTP Header Auth credential.

Requirements
(Free) Mistral API Key
Google Drive
Google Sheets

Customization
Either use the default "Extract from PDF" node or use Mistral OCR for better results.

Nodes Used (4)

Code
n8n-nodes-base.code
Google Drive
n8n-nodes-base.googleDrive
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest