Skip to main content

Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets

Workflow preview

Workflow preview
100%
Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Personal Finance AI Agent – Telegram Bot (n8n Workflow) A fully automated Telegram based personal finance tracker that: Accepts receipts as images , PDFs , or plain text Uses Google Gemini Vision f...

Best for

  • Personal Productivity automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.aggregate, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.toolcalculator

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Anakhuagbor Sule.

Original n8n.io source

1.1 Workflow description

Title
Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets
Workflow name
Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets

Personal Finance AI Agent – Telegram Bot (n8n Workflow)

A fully automated Telegram-based personal finance tracker that:

  • Accepts receipts as images, PDFs, or plain text
  • Uses Google Gemini Vision for OCR & intelligent extraction
  • Logs every expense into Google Sheets
  • Stores receipt images/PDFs in Google Drive
  • Answers natural-language spending questions ("How much did I spend on food last month?", "Compare this month vs last month", etc.)

Built entirely with n8n – 100% self-hostable, no-code/low-code.


How It Works (Overview)

  1. You send a message to your Telegram bot
    → Photo of a receipt, PDF, or just text like "Nov 10 – 2500 NGN – Uber"

  2. Switch node detects the message type:

    • Photo → Branch 0
    • Document (PDF/other) → Branch 1
    • Pure text → Branch 2 (goes straight to query agent)
  3. Receipt Processing Path (Images & PDFs)

    • Files downloaded from Telegram → uploaded to Google Drive ("Monthly receipts" folder)
    • Images → OCR with Gemini Vision
      PDFs → native PDF text extraction
    • Extracted text + Drive link → merged → sent to Gemini AI Agent
    • AI extracts: Date (YYYY-MM-DD) • Amount (NGN) • Description • Category
      (food, transportation, subscriptions, takeouts, entertainment, gift, electricity, repairs, other stuffs)
    • Clean JSON → appended to Google Sheets → friendly confirmation sent back
  4. Spending Query Path (Text questions)

    • Second AI Agent with access to the live Google Sheet + calculator + memory
    • Answers anything: totals, breakdowns, comparisons, trends, percentages…

Live Google Sheet (Template)

You can make a copy of the exact sheet the bot uses:
https://docs.google.com/spreadsheets/d/1kwWJquPpwL9vt9U06a4f4phXq5jZjaGazvh2V69FGoc/edit?usp=sharing

Just click File → Make a copy and use your copy’s ID in the workflow.


Setup Steps (Step-by-Step)

Prerequisites

  • n8n instance (cloud or self-hosted)
  • Telegram bot (created via @BotFather)
  • Google account

1. Create Telegram Bot

  1. Message @BotFather → /newbot
  2. Copy the bot token
  3. In n8n → Credentials → New Telegram API credential → paste token

2. Google Setup

  1. Make a copy of the sheet above
    → Copy the new spreadsheet ID from the URL
  2. Create a Google Drive folder called "Monthly receipts" (or any name) → copy folder ID
  3. Enable Gemini API in Google Cloud (or use your existing key)
  4. In n8n create these credentials:
    • Google Sheets OAuth2 API
    • Google Drive OAuth2 API
    • Google Gemini (PaLM) API

3. Import Workflow

  • Copy the full JSON from the original file
  • n8n → Workflows → Import → paste → Import

4. Update IDs & Credentials

After import, configure these nodes:

Node What to Change
Telegram Trigger + all Telegram nodes Your Telegram credential
Google Sheets nodes Your Google Sheets credential + new Sheet ID
Google Drive "Upload file" nodes Paste your "Monthly receipts" folder ID
Gemini nodes Your Gemini credential
AI Agent & AI Agent1 Verify model, memory, tools are connected

5. Activate & Test

  • Click Activate
  • Start chatting with your bot on Telegram

Test commands

  • Send a photo/PDF receipt
  • Type: How much did I spend last month?
  • Type: Show me food spending this month vs last month

You’ll get instant replies and see new rows appear in your sheet!


Features

  • Zero manual entry ever again
  • Works with handwritten receipts
  • Smart categorization
  • Natural-language spending insights
  • All data stays 100% in your Google account
  • Completely private & self-hostable
  • NGN-native (Naira)

Never track expenses manually again!

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 2 - Aggregate1

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 3 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 4 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 5 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 7 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 8 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 9 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 10 - Get a file1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - Get a file2

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 12 - Append row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 13 - Send a text message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 14 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Get row(s) in sheet in Google Sheets

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 16 - Upload file

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 17 - Upload file1

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 18 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 19 - Analyze an image

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 20 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 21 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - AI Agent1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 23 - Simple Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 24 - Calculator1

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets
Complexity advanced
Nodes 32
Categories Personal Productivity, AI Chatbot
Author Anakhuagbor Sule
Published 15 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10871/10871.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets do?

Personal Finance AI Agent – Telegram Bot (n8n Workflow) A fully automated Telegram based personal finance tracker that: Accepts receipts as images , PDFs , or plain text Uses Google Gemini Vision f...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Personal Productivity, AI Chatbot use case.