Automation library · Money admin

Analyze invoices from Google Drive with Gemini and OpenAI

Started by an incoming Telegram message, and works across Google Drive, Google Sheets and Telegram. It hands the judgement calls to Gemini and OpenAI. 19 steps, 1 branch, 2 loops or waits: a working afternoon to understand properly.

MediumCalls a model: Gemini, OpenAI

19 stepsMedium: a working afternoon
1Branch: places the flow splits
2Loops or waits
3Services it connects to

The flow

Starts it 2Model 3Logic 7Service 7

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2Google Drive TriggerGoogle Drive triggerStarts it
  3. 3Save_driveGoogle DriveService
  4. 4MapeoSetLogic
  5. 5Loop Over ItemsSplit In BatchesLogic
  6. 6SwitchSwitchLogic
  7. 7download imageGoogle DriveService
  8. 8Download PDFGoogle DriveService
  9. 9Download imageGoogle DriveService
  10. 10analyze imageOpen AiModel
  11. 11analyze documentGoogle GeminiModel
  12. 12analyze image1Open AiModel
  13. 13Edit Fields1SetLogic
  14. 14Edit FieldsSetLogic
  15. 15Edit Fields2SetLogic
  16. 16Put data in table1Google SheetsService
  17. 17Put data in tableGoogle SheetsService
  18. 18Put data in table2Google SheetsService
  19. 19WaitWaitLogic

How it's built

Starts on
An incoming Telegram message
Steps
19, with 1 branch, 2 loops or waits
Size
Medium: a working afternoon
Connects to
Google Drive, Google Sheets, Telegram
Model
Gemini, OpenAI

Questions

What does it need to run?

An n8n account, plus your own Google Drive, Google Sheets and Telegram accounts, and a key for Gemini and OpenAI. 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?

Yes. It calls Gemini and OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 19 steps is enough that you should read each one before running it.

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 19 steps before you point it at anything that matters.