# AI-powered receipt and expense tracker with Telegram: n8n workflow

> Started by an incoming Telegram message, and works across Google Sheets, Redis and Telegram. It hands the judgement calls to OpenAI and OpenRouter.

Source: https://millionrounds.com/workflow/ai-powered-receipt-and-expense-tracker-with-telegram (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Money admin](https://millionrounds.com/workflows?category=Money+admin#library)

# 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.

Large Calls a model: OpenAI, OpenRouter

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-receipt-and-expense-tracker-with-telegram)

**45 steps** Large: read it before trusting it with anything live

**8** Branches: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 4 Logic 18 Service 22

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

- 1 **OpenRouter Chat Model** Lm Chat Open Router *Model*
- 2 **Structured Output Parser** Output Parser Structured *Model*
- 3 **Telegram Trigger** Telegram trigger *Starts it*
- 4 **AI Categorizer** Chain Llm *Model*
- 5 **Check Start** If *Logic*
- 6 **Check Income** If *Logic*
- 7 **Check Expenses** If *Logic*
- 8 **Check Input** If *Logic*
- 9 **Extract AI Result** Telegram *Service*
- 10 **Welcome Menu** Telegram *Service*
- 11 **Save Income to Redis** Redis *Service*
- 12 **Save Expenses to Redis** Redis *Service*
- 13 **Get Transaction Type** Redis *Service*
- 14 **Transform to Sheets Format** Code *Logic*
- 15 **Request Pemasukan** Telegram *Service*
- 16 **Request expense** Telegram *Service*
- 17 **Extract Transaction Type** Set *Logic*
- 18 **Delay** Wait *Logic*
- 19 **Content Type Router** Switch *Logic*
- 20 **check price** Set *Logic*
- 21 **Download Image** Telegram *Service*
- 22 **Notify PDf** Telegram *Service*
- 23 **Ambil Vn** Http Request *Service*
- 24 **Extract Text Input** Set *Logic*
- 25 **price greater than 0?** If *Logic*
- 26 **Convert to Base64** Code *Logic*
- 27 **📥 Download PDF from Telegram** Telegram *Service*
- 28 **Download VN** Http Request *Service*
- 29 **Merge** Merge *Logic*
- 30 **Expenses?** If *Logic*
- 31 **Send Error** Telegram *Service*
- 32 **Google Vision OCR** Http Request *Service*
- 33 **☁️ Upload PDF to LlamaIndex** Http Request *Service*
- 34 **OpenAI** Open Ai *Model*
- 35 **Input Accept** Telegram *Service*
- 36 **Send Expense Summary** Telegram *Service*
- 37 **Send Income Summary** Telegram *Service*
- 38 **Check OCR Result** Code *Logic*
- 39 **⏳ Check Parsing Status** Http Request *Service*
- 40 **Append Expenses** Google Sheets *Service*
- 41 **Append Income** Google Sheets *Service*
- 42 **Extract OCR Text** Set *Logic*
- 43 **🔁 Condition: Was Parsing Successful?** If *Logic*
- 44 **📥 Get Parsed Markdown Result** Http Request *Service*
- 45 **⏱ Delay Before Recheck** Wait *Logic*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-receipt-and-expense-tracker-with-telegram)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Redis](https://millionrounds.com/workflows?service=Redis#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**AI-powered invoice processing automation with Google Sheets** 44 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-powered-invoice-processing-automation-with-google-sheets)
- [**Real-time sales quote creation in Odoo with Telegram** 43 steps · calls a model · Telegram](https://millionrounds.com/workflow/real-time-sales-quote-creation-in-odoo-with-telegram)
- [**WhatsApp productivity assistant with OpenAI and Gmail** 47 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/whatsapp-productivity-assistant-with-openai-and-gmail)
- [**Gmail invoice reader with Ollama** 40 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/gmail-invoice-reader-with-ollama)
- [**Handle Telegram support, payments, and logo orders** 51 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/handle-telegram-support-payments-and-logo-orders)
- [**Payment processing and order tracking with YooKassa** 39 steps · Google Sheets](https://millionrounds.com/workflow/payment-processing-and-order-tracking-with-yookassa)
