Latenode

Automate invoice data extraction and sync to Google Sheets

This template turns inbound invoice email into spreadsheet rows. Gmail starts the run when a message lands on the invoices label you choose.

Latenode downloads the attachment, OCR Space reads the text, and ChatGPT returns invoice number, supplier, and totals. Google Sheets appends the row, then Gmail labels the message as processed. Connect Gmail, OCR Space, and Google Sheets. Put the OCR Space API key on the OCR Space connection.

Updated Sep 16, 2026Est. run: 3sEst. cost: $0.0002
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 invoice email into spreadsheet rows without typing totals
  • Downloads each Gmail attachment
  • Reads text with OCR Space
  • Extracts invoice number, supplier, and total with ChatGPT
  • Labels the message after the row is written

How it works

1
Trigger

Watch the invoices label

The scenario starts when a message lands on the Gmail label you use for invoices.

2
Action

Download and read the file

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

3
AI

Extract invoice fields

ChatGPT pulls invoice number, supplier, dates, and totals from the OCR text.

4
Action

Append the row and label the mail

Google Sheets gets a new reconciliation row. Gmail adds a processed label so later runs can skip the same message.

Setup guide

1

Connect Gmail

Add a Gmail connection. Watch the label you use for invoices, or apply that label with a Gmail filter. Download the attachment on each run.

2

Connect OCR Space

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

3

Connect Google Sheets

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

4

Extract, append, and label

Send the OCR text to ChatGPT for invoice number, supplier, date, and total. Append a Google Sheets row, including the Gmail message id. Add a processed label on the email after a successful row.

Requirements

A Gmail label Latenode can read for incoming invoices
An OCR Space account and API key stored on the OCR Space connection
A Google Sheet you can append to
Invoice attachments OCR Space can read; test a sample PDF if that is your format

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. Plug-and-Play AI nodes are billed separately.