Automation library · Money admin

Track receipt expenses from Telegram with Gemini

Started by an incoming Telegram message, and works across Google Drive, Google Sheets and Telegram. It hands the judgement calls to Gemini. 25 steps, 4 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini

25 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 1Model 3Logic 8Service 13

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

  1. 1Build Receipt SchemaOutput Parser StructuredModel
  2. 2When Telegram Message ReceivedTelegram triggerStarts it
  3. 3Google Gemini Vision ModelLm Chat Google GeminiModel
  4. 4AI Receipt Vision ChainChain LlmModel
  5. 5Normalize Message FieldsSetLogic
  6. 6Prepare Extracted FieldsSetLogic
  7. 7Send Extraction Failure NoticeTelegramService
  8. 8Route by Message TypeSwitchLogic
  9. 9Check Existing Expenses in SheetsGoogle SheetsService
  10. 10Read All Expenses from SheetsGoogle SheetsService
  11. 11Download Receipt FileTelegramService
  12. 12Ask for Receipt PromptTelegramService
  13. 13If Receipt Already ProcessedIfLogic
  14. 14Filter Current Month ExpensesFilterLogic
  15. 15Upload Receipt to Google DriveGoogle DriveService
  16. 16Send Duplicate Receipt NoticeTelegramService
  17. 17If Receipt Needs ReviewIfLogic
  18. 18Summarize by CategorySummarizeService
  19. 19Ask Admin for Review ApprovalTelegramService
  20. 20Append Expense to SheetsGoogle SheetsService
  21. 21Aggregate Category TotalsAggregateLogic
  22. 22If Review ApprovedIfLogic
  23. 23Send Expense Summary via TelegramTelegramService
  24. 24Send Monthly Totals via TelegramTelegramService
  25. 25Send Discarded Receipt NoticeTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
25, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Google Sheets, Telegram
Model
Gemini

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. 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. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 25 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 25 steps before you point it at anything that matters.