Automation library · Money admin

AI-powered receipt and expense tracker with Telegram

Started by an incoming Telegram message, and works across Google Sheets, Redis and Telegram. It hands the judgement calls to OpenAI and OpenRouter. 45 steps, 8 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI, OpenRouter

45 stepsLarge: read it before trusting it with anything live
8Branches: places the flow splits
2Loops or waits
3Services it connects to

The flow

Starts it 1Model 4Logic 18Service 22

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

  1. 1OpenRouter Chat ModelLm Chat Open RouterModel
  2. 2Structured Output ParserOutput Parser StructuredModel
  3. 3Telegram TriggerTelegram triggerStarts it
  4. 4AI CategorizerChain LlmModel
  5. 5Check StartIfLogic
  6. 6Check IncomeIfLogic
  7. 7Check ExpensesIfLogic
  8. 8Check InputIfLogic
  9. 9Extract AI ResultTelegramService
  10. 10Welcome MenuTelegramService
  11. 11Save Income to RedisRedisService
  12. 12Save Expenses to RedisRedisService
  13. 13Get Transaction TypeRedisService
  14. 14Transform to Sheets FormatCodeLogic
  15. 15Request PemasukanTelegramService
  16. 16Request expenseTelegramService
  17. 17Extract Transaction TypeSetLogic
  18. 18DelayWaitLogic
  19. 19Content Type RouterSwitchLogic
  20. 20check priceSetLogic
  21. 21Download ImageTelegramService
  22. 22Notify PDfTelegramService
  23. 23Ambil VnHttp RequestService
  24. 24Extract Text InputSetLogic
  25. 25price greater than 0?IfLogic
  26. 26Convert to Base64CodeLogic
  27. 27📥 Download PDF from TelegramTelegramService
  28. 28Download VNHttp RequestService
  29. 29MergeMergeLogic
  30. 30Expenses?IfLogic
  31. 31Send ErrorTelegramService
  32. 32Google Vision OCRHttp RequestService
  33. 33☁️ Upload PDF to LlamaIndexHttp RequestService
  34. 34OpenAIOpen AiModel
  35. 35Input AcceptTelegramService
  36. 36Send Expense SummaryTelegramService
  37. 37Send Income SummaryTelegramService
  38. 38Check OCR ResultCodeLogic
  39. 39⏳ Check Parsing StatusHttp RequestService
  40. 40Append ExpensesGoogle SheetsService
  41. 41Append IncomeGoogle SheetsService
  42. 42Extract OCR TextSetLogic
  43. 43🔁 Condition: Was Parsing Successful?IfLogic
  44. 44 📥 Get Parsed Markdown ResultHttp RequestService
  45. 45 ⏱ Delay Before RecheckWaitLogic

How it's built

Starts on
An incoming Telegram message
Steps
45, with 8 branches, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets, Redis, Telegram
Model
OpenAI, OpenRouter

Questions

What does it need to run?

An n8n account, plus your own Google Sheets, Redis and Telegram accounts, and a key for OpenAI and OpenRouter. 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 OpenAI and OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

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