Invoice PDFs to Sheets with OCR.Space
Drive invoices read by OCR into one row each. An n8n template for back-office teams that re-key invoice data from PDFs into spreadsheets. A Schedule Trigger finds the current-month subfolder in a Google Drive invoice folder, downloads the PDFs and images, sends them to the OCR.Space API and cleans the text in a Code node. An OpenAI model converts the text to JSON with invoice date, due date, client name, line items, totals and bank details, and one row per invoice is appended to Google Sheets with a link to the source file.
Steps
- Trigger: Scheduled trigger runs on a recurring cadence
- Scan the parent folder in Google DriveGoogle Drive
- Auto-detect the current-month folder
- Download PDFs and images from the folderGoogle Drive
- Extract text with the OCR.Space APIOCR.Space
- Clean and normalize with a Code node
- OpenAI model extracts invoice fields to JSONOpenAI
Invoice date, due date, client name, line items, totals, bank info. - Output: Append one row per invoice to Google SheetsGoogle Sheets
Limits
- Invoices must be organized in monthly folders on Google Drive.
What it does well
- Keeps a Google Drive link to each invoice file.
Before you import
You need: an OpenAI or other LLM API credential, Google Drive, Google Sheets and an OCR.Space key.
Similar templates
Gmail invoices to QuickBooks bills
Also for invoicing and payments, 11 steps.
Gmail invoice PDFs to Sheets with GPT
Also for invoicing and payments, 8 steps.
Month-end accounting document check
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.