Automation library · Money admin

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

21 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
5Loops or waits
4Services it connects to

The flow

Starts it 3Logic 12Service 6

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

  1. 1Telegram Trigger ImageTelegram triggerStarts it
  2. 2Gmail TriggerGmail triggerStarts it
  3. 3Google Drive Trigger New FilesGoogle Drive triggerStarts it
  4. 4Create File Name For TelegramCodeLogic
  5. 5Loop Over EmailsSplit In BatchesLogic
  6. 6Loop Over ItemsSplit In BatchesLogic
  7. 7Google Save Files 2Google DriveService
  8. 8Loop Over AttachmentsSplit In BatchesLogic
  9. 9IfIfLogic
  10. 10Google Drive Get ReceiptGoogle DriveService
  11. 11Create File NameCodeLogic
  12. 12Split Out Binary FilesCodeLogic
  13. 13Move file to base64 stringExtract From FileService
  14. 14Google Drive Save FilesGoogle DriveService
  15. 15PromptSetLogic
  16. 16Wait For SavingWaitLogic
  17. 17Gemini APIHttp RequestService
  18. 18JSON to stringSetLogic
  19. 19Parse stringCodeLogic
  20. 20Add to Google SheetsGoogle SheetsService
  21. 21Wait For Saving DataWaitLogic

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.