Scanned invoices to Sheets via OCR
Drive scans read by OCR and OpenAI, saved to Sheets. This n8n template uses a Google Drive trigger that checks every minute for newly created files and determines whether each is a PDF or an image. It attempts direct text extraction first and uses the OCR.Space API for optical character recognition. An OpenAI model identifies the company name, total amount, currency, invoice date and invoice number. Rows are added to Google Sheets with links back to the original scanned documents, and Mailgun sends formatted email notifications that include an HTML table summary. It needs Google Drive, Google Sheets, OpenAI, OCR.Space and Mailgun credentials.
Steps
- Trigger: File monitoringGoogle Drive
- File processing
- Text extractionOCR.Space
- AI information extractionOpenAI
- Output: Data storageGoogle Sheets
- Output: NotificationMailgun
Limits
- Needs OCR.Space and Mailgun accounts.
What it does well
- Attempts direct text extraction first, then OCR.Space.
Before you import
You need: Google Drive OAuth2, Google Sheets OAuth2, OpenAI, OCR.Space and Mailgun APIs.
Similar templates
Route scanned invoices by company
Also for invoicing and payments, 5 steps.
Overdue invoice reminders in Gmail
Also for invoicing and payments, 7 steps.
Chase unpaid invoices with Claude
Also for invoicing and payments, 7 steps.
Google Sheets and OpenAI: 24 templates compared
Same two apps, different steps.
Google Drive and Google Sheets: 12 templates compared
Same two apps, different steps.
Google Drive and OpenAI: 11 templates compared
Same two apps, different steps.
Google Drive and OCR.Space: 3 templates compared
Same two apps, different steps.
OCR.Space and OpenAI: 3 templates compared
Same two apps, different steps.
Google Sheets and OCR.Space: 2 templates compared
Same two apps, different steps.
Copy records between apps
Other templates that do this task.