# Auto invoice & receipt OCR to Google Sheets – Drive, Gmail: n8n workflow

> Started by an incoming Telegram message, and works across Gmail, Google Drive, Google Sheets and Telegram.

Source: https://millionrounds.com/workflow/auto-invoice-and-receipt-ocr-to-google-sheets-drive-gmail (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Money admin](https://millionrounds.com/workflows?category=Money+admin#library)

# Auto invoice & receipt OCR to Google Sheets – Drive, Gmail

Started by an incoming Telegram message, and works across Gmail, Google Drive, Google Sheets and Telegram. 21 steps, 1 branch, 5 loops or waits: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fauto-invoice-and-receipt-ocr-to-google-sheets-drive-gmail)

**21 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**5** Loops or waits

**4** Services it connects to

## The flow

Starts it 3 Logic 12 Service 6

The steps in the order they run, from what starts it.

- 1 **Telegram Trigger Image** Telegram trigger *Starts it*
- 2 **Gmail Trigger** Gmail trigger *Starts it*
- 3 **Google Drive Trigger New Files** Google Drive trigger *Starts it*
- 4 **Create File Name For Telegram** Code *Logic*
- 5 **Loop Over Emails** Split In Batches *Logic*
- 6 **Loop Over Items** Split In Batches *Logic*
- 7 **Google Save Files 2** Google Drive *Service*
- 8 **Loop Over Attachments** Split In Batches *Logic*
- 9 **If** If *Logic*
- 10 **Google Drive Get Receipt** Google Drive *Service*
- 11 **Create File Name** Code *Logic*
- 12 **Split Out Binary Files** Code *Logic*
- 13 **Move file to base64 string** Extract From File *Service*
- 14 **Google Drive Save Files** Google Drive *Service*
- 15 **Prompt** Set *Logic*
- 16 **Wait For Saving** Wait *Logic*
- 17 **Gemini API** Http Request *Service*
- 18 **JSON to string** Set *Logic*
- 19 **Parse string** Code *Logic*
- 20 **Add to Google Sheets** Google Sheets *Service*
- 21 **Wait For Saving Data** Wait *Logic*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 21, with 1 branch, 5 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Google Sheets, Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive, Google Sheets and Telegram accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 21 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 21 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fauto-invoice-and-receipt-ocr-to-google-sheets-drive-gmail)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**Send Stripe payment invoices with Gmail and Google Drive** 21 steps · Gmail, Google Drive](https://millionrounds.com/workflow/send-stripe-payment-invoices-with-gmail-and-google-drive)
- [**Send tailored Upwork job proposals with Gemini and Slack** 21 steps · Gmail, Google Drive](https://millionrounds.com/workflow/send-tailored-upwork-job-proposals-with-gemini-and-slack)
- [**Telegram payment, invoicing and refund workflow for Stars** 21 steps · Google Sheets, Telegram](https://millionrounds.com/workflow/telegram-payment-invoicing-and-refund-workflow-for-stars)
- [**Automate invoice processing with Google Drive and Sheets** 21 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automate-invoice-processing-with-google-drive-and-sheets)
- [**Consolidate Stripe, PayPal, Shopify and bank revenue** 21 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/consolidate-stripe-paypal-shopify-and-bank-revenue)
- [**Expense organizer with Google Drive and Gemini** 21 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/expense-organizer-with-google-drive-and-gemini)
