Latenode

Automated PDF invoice extraction and Telegram reporting

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.

Telegram then sends a short billing message. Connect Google Drive, OCR Space, Google Sheets, and Telegram. Put the OCR Space API key on the OCR Space connection. Put the Telegram bot token on the Telegram connection.

Updated Sep 16, 2026Est. run: 24sEst. cost: $0.0015
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
  • 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
  • Pings Telegram when a new invoice is logged

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 and read the file

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

3
Logic

Parse date, vendor, and total

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

4
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.

5
Action

Notify Telegram

Telegram sends the billing chat a short message with vendor and total. Put the bot token on the Telegram connection.

Setup guide

1

Connect Google Drive

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

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 date, vendor, total, invoice number, and file id.

4

Connect Telegram

Add a Telegram connection and paste your bot token there. Choose the chat that should get new-invoice messages.

5

Wire Drive, OCR, Sheets, and Telegram

Watch the folder, download the file, read it with OCR Space, pull date, vendor, and total in JavaScript, append a Google Sheets row, then send Telegram. 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
A Telegram bot token stored on the Telegram connection
Files OCR Space can read, such as images; 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.