Automation library · Money admin

Automated expense tracking from emails & Telegram with Gemini

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

LargeCalls a model: Gemini

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

The flow

Starts it 2Model 12Logic 4Service 5

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2Google Gemini Chat ModelLm Chat Google GeminiModel
  3. 3Google Gemini Chat Model1Lm Chat Google GeminiModel
  4. 4Google Gemini Chat Model2Lm Chat Google GeminiModel
  5. 5Structured Output ParserOutput Parser StructuredModel
  6. 6Structured Output Parser1Output Parser StructuredModel
  7. 7Gmail TriggerGmail triggerStarts it
  8. 8Google Gemini Chat Model3Lm Chat Google GeminiModel
  9. 9Google Gemini Chat Model4Lm Chat Google GeminiModel
  10. 10Information extraction from telegram inputChain LlmModel
  11. 11Budget information extractorChain LlmModel
  12. 12Expense information extractorChain LlmModel
  13. 13Extract the email only from specified bank/UPI apps or the transactions made from themCodeLogic
  14. 14Generate the structured data from the raw emailsChain LlmModel
  15. 15Extract the information and parse itInformation ExtractorModel
  16. 16Raw check if the transaction is 'Budget' or 'Expense'IfLogic
  17. 17Check if the transaction is 'Budget' or 'Expense'IfLogic
  18. 18Check if the transaction is 'Credit' or 'Debit'IfLogic
  19. 19Append transaction data to budget sheetGoogle SheetsService
  20. 20Append transaction data to expense sheetGoogle SheetsService
  21. 21Append transaction data to expense sheet1Google SheetsService
  22. 22Append transaction data to expense sheet2Google SheetsService
  23. 23Send a confirmation reply to the userTelegramService

How it's built

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

Questions

What does it need to run?

An n8n account, plus your own Gmail, 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 23 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 23 steps before you point it at anything that matters.