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.

n8nRead on 2026-11-168 steps

Steps

  1. Trigger: Scheduled trigger runs on a recurring cadence
  2. Scan the parent folder in Google DriveGoogle Drive
  3. Auto-detect the current-month folder
  4. Download PDFs and images from the folderGoogle Drive
  5. Extract text with the OCR.Space APIOCR.Space
  6. Clean and normalize with a Code node
  7. OpenAI model extracts invoice fields to JSONOpenAI
    Invoice date, due date, client name, line items, totals, bank info.
  8. 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