Latenode

Automate PDF invoice data extraction to Google Sheets

This template watches a Google Drive folder for new invoice files, downloads each file, reads text with OCR Space, and uses JavaScript to pull date, vendor, and total into a Google Sheets row. Connect Google Drive, OCR Space, and Google Sheets, then point the trigger at the folder you use for incoming invoices. Put the OCR Space API key on the OCR Space connection.

Updated Sep 16, 2026Est. run: 21sEst. cost: $0.0013
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Turns new Drive invoices into spreadsheet rows without typing totals
  • Downloads each file from Google Drive
  • Reads text with OCR Space
  • Pulls date, vendor, and total in JavaScript
  • Keeps a Drive file id on the row so later runs can skip repeats

How it works

1
Trigger

Watch the Drive folder

The scenario starts when a file appears or changes in the Google Drive folder you choose.

2
Action

Download the file

Latenode downloads the file so OCR Space can read it.

3
Action

Read text with OCR Space

OCR Space returns the document text. Put the API key on the OCR Space connection.

4
Logic

Parse date, vendor, and total

JavaScript pulls those fields from the OCR text and shapes a Sheets row.

5
Action

Append the row

Google Sheets gets a new row with date, vendor, total, and the Drive file id so later runs can skip files you already logged.

Setup guide

1

Connect Google Drive

Add a Google Drive connection with access to the invoice folder.

2

Connect Google Sheets

Add a Google Sheets connection. Use a sheet with columns for date, vendor, total, invoice number, and file id.

3

Connect OCR Space

Add an OCR Space connection and paste your OCR Space API key there.

4

Wire Drive, OCR, and Sheets

Watch the folder, download the file, read it with OCR Space, pull date, vendor, and total in JavaScript, then append a Google Sheets row. Look up the file id in the sheet first if you want to skip documents you already logged.

Requirements

A Google Drive folder Latenode can read
An OCR Space account and API key stored on the OCR Space connection
A Google Sheet you can append to
Invoice files OCR Space can read; run one sample PDF through OCR Space and check the text before you scale

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.