Skip to main content

Automated financial tracker: Telegram invoices to Notion with Gemini AI reports

Workflow preview

Workflow preview
100%
Automated financial tracker: Telegram invoices to Notion with Gemini AI reports preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Automated Financial Tracker: Telegram Invoices to Notion with AI Summaries & Reports Tired of manually logging every expense? Streamline your financial tracking with this powerful n8n workflow! Sna...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.notion, n8n-nodes-base.summarize, n8n-nodes-base.quickchart, n8n-nodes-base.telegram

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rizqi Pratama Ramadhani.

Original n8n.io source

1.1 Workflow description

Title
Automated financial tracker: Telegram invoices to Notion with Gemini AI reports
Workflow name
Automated financial tracker: Telegram invoices to Notion with Gemini AI reports

Automated Financial Tracker: Telegram Invoices to Notion with AI Summaries & Reports


Tired of manually logging every expense? Streamline your financial tracking with this powerful n8n workflow!

Snap a photo of your invoice in Telegram, and let AI (powered by Google Gemini) automatically extract the details, record them in your Notion database, and even send you a quick summary. Plus, get scheduled weekly reports with charts to visualize your spending. Automate your finances, save time, and gain better insights with this easy-to-use template!

Transform your expense tracking from a chore into an automated breeze. Try it out!


Overview:

This workflow revolutionizes how you track your finances by automating the entire process from invoice capture to reporting. Simply send a photo of an invoice or receipt to a designated Telegram chat, and this workflow will:

  1. Extract Data with AI: Utilize Google Gemini's capabilities to perform OCR on the image, understand the content, and extract key details like item name, quantity, price, total, date, and even attempt to categorize the expense.
  2. Store in Notion: Automatically log each extracted transaction into a structured Notion database.
  3. Instant Feedback: Send a summary of the processed transaction back to your Telegram chat.
  4. Scheduled Reporting: Generate and send a visual summary of your expenses (e.g., weekly spending by category) as a chart to your preferred Telegram chat or group.

This workflow is perfect for individuals, freelancers, or small teams looking to effortlessly manage their expenses without manual data entry.

Key Features & Benefits:

  • Effortless Expense Logging: Just send a picture โ€“ no more typing!
  • AI-Powered Data Extraction: Leverages Google Gemini for intelligent invoice processing.
  • Centralized Data in Notion: Keep all your financial records neatly organized in a Notion database.
  • Automated Categorization: AI helps in categorizing your expenses (e.g., Food & Beverage, Transportation).
  • Instant Summaries: Get immediate confirmation and a summary of what was recorded.
  • Visual Reporting: Receive scheduled charts (e.g., bar charts of spending by category) directly in Telegram.
  • Customizable: Easily adapt the workflow to your specific needs, categories, and reporting preferences.
  • Time-Saving: Drastically reduces the time spent on manual financial administration.

How It Works (Workflow Breakdown):

The workflow is divided into two main parts:

Part 1: Real-time Invoice Processing & Logging (## Auto Notes Transaction with Telegram and Notion database)

  1. Telegram Trigger (Telegram Trigger | When recive photo): Activates when a new photo is sent to the configured Telegram chat.
  2. Get Photo Info (Get Info Photo from telegram chat): Retrieves the details of the received photo.
  3. Get Image Info (Get Image Info): Prepares the image data.
  4. AI Data Extraction (Google Gemini Chat Model & Basic LLM Chain):
    • The image data is sent to the Google Gemini Chat Model.
    • A specific prompt instructs the AI to extract details (date, ID, name, quantity, price, total, category, tax) in a JSON array format and provide a summary message. The categories include Food & Beverage, Transportation, Utilities, Shopping, Healthcare, Entertainment, Housing, and Education.
  5. Parse AI Output (Parse To your object | Table): Structures the AI's JSON output for easier handling.
  6. Split Transactions (Split Out | data transaction): If an invoice contains multiple items, this node splits them into individual records.
  7. Record to Notion (Record To Notion Database): Each transaction item is added as a new page/entry in your specified Notion database, mapping fields like Name, Quantity, Price, Total, Category, Date, and Tax.
  8. Send Telegram Summary (Sendback to chat and give summarize text): The summary message generated by the AI is sent back to the original Telegram chat.

Part 2: Scheduled Financial Reporting (## Schedule report to send on chanel or private message)

  1. Schedule Trigger (Schedule Trigger | for send chart report): Runs at a predefined interval (e.g., every week) to generate reports.
  2. Get Recent Data from Notion (Get Recent Data from Notions): Fetches transaction data from the Notion database for a specific period (e.g., the past week).
  3. Summarize Data (Summarize Transaction Data): Aggregates the data, for example, by summing up the 'total' amount for each 'category'.
  4. Prepare Chart Data (Convert Data to JSON chart payload): Transforms the summarized data into a JSON format suitable for generating a chart (e.g., labels for categories, data for spending amounts).
  5. Generate Chart (Generate Chart): Uses the QuickChart node to create a visual chart (e.g., a bar chart) from the prepared data.
  6. Send Chart to Telegram (Send Chart Image to Group or Private Chat): Sends the generated chart image to a specified Telegram chat ID or group.

Nodes Used (Key Nodes):

  • Telegram Trigger & Telegram Node: For receiving images and sending messages/images.
  • Google Gemini Chat Model (Langchain): For AI-powered OCR and data extraction from invoices.
  • Basic LLM Chain (Langchain): To interact with the language model using specific prompts.
  • Output Parser Structured (Langchain): To structure the output from the language model.
  • Notion Node: For reading from and writing to your Notion databases.
  • Schedule Trigger: To automate the reporting process.
  • Summarize Node: To aggregate data for reports.
  • Code Node: Used here to format data for the chart.
  • QuickChart Node: For generating charts.
  • SplitOut Node: To process multiple items from a single invoice.

Setup Instructions:

  1. Credentials:
    • Telegram: Create a Telegram bot and get its API token. You'll also need the Chat ID where you'll send invoices and where reports should be sent.
    • Google Gemini (PaLM) API: You'll need an API key for Google Gemini.
    • Notion: Create a Notion integration and get the API key. Create a Notion database with properties corresponding to the data you want to save (e.g., Name (Title), Quantity (Number), Price (Number), Total (Number), Category (Select), Date (Text or Date), Tax (Number)). Share this database with your Notion integration.
  2. Configure Telegram Trigger:
    • Add your Telegram Bot API token.
    • When you first activate the workflow or test the trigger, send /start to your bot in the chat you want to use for sending invoices. n8n will then capture the Chat ID.
  3. Configure Google Gemini Node (Google Gemini Chat Model):
    • Select or add your Google Gemini API credentials.
    • Review the prompt in the Basic LLM Chain node and adjust if necessary (e.g., date format, categories).
  4. Configure Notion Nodes:
    • Record To Notion Database:
      • Select or add your Notion API credentials.
      • Select your target Notion Database ID.
      • Map the properties from the workflow (e.g., ={{ $json.name }}) to your Notion database columns.
    • Get Recent Data from Notions:
      • Select or add your Notion API credentials.
      • Select your target Notion Database ID.
      • Adjust the filter if needed (default is "past_week").
  5. Configure Telegram Node for Reports (Send Chart Image to Group or Private Chat):
    • Select or add your Telegram Bot API token.
    • Enter the Chat ID for the group or private chat where you want to receive the reports.
  6. Configure Schedule Trigger (Schedule Trigger | for send chart report):
    • Set your desired schedule (e.g., every Monday at 9 AM).
  7. Test: Send an image of an invoice to your Telegram bot and check if the data appears in Notion and if you receive a summary message. Wait for the scheduled report or manually trigger it to test the reporting functionality.

Sticky Note Text for Your n8n Template:

(These are suggestions. You would place these directly into the sticky notes within your n8n workflow editor.)

Existing High-Level Sticky Notes:

  • ## Auto Notes Transaction with Telegram and Notion database
  • ## Schedule report to send on chanel or private message

Specific Sticky Notes to Add:

  • On Telegram Trigger | When recive photo:
    ๐Ÿ“ธ INVOICE INPUT ๐Ÿ“ธ
    Bot listens here for photos of your receipts/invoices.
    Ensure your Telegram Bot API token is set in credentials.
    
  • Near Google Gemini Chat Model & Basic LLM Chain:
    ๐Ÿค– AI MAGIC HAPPENS HERE ๐Ÿง 
    - Image is sent to Google Gemini for data extraction.
    - Check 'Basic LLM Chain' to customize the AI prompt (e.g., categories, output format).
    - Requires Google Gemini API credentials.
    
  • On Parse To your object | Table:
    โœจ STRUCTURING AI DATA โœจ
    Converts the AI's text output into a usable JSON object.
    Check the schema if you modify the AI prompt significantly.
    
  • On Record To Notion Database:
    ๐Ÿ“ SAVING TO NOTION ๐Ÿ“
    - Extracted transaction data is saved here.
    - Configure with your Notion API key & Database ID.
    - Map fields correctly to your database columns!
    
  • On Sendback to chat and give summarize text:
    ๐Ÿ’ฌ TRANSACTION SUMMARY ๐Ÿ’ฌ
    Sends a confirmation message back to the user in Telegram
    with a summary of the recorded expense.
    
  • On Schedule Trigger | for send chart report:
    ๐Ÿ—“๏ธ REPORTING SCHEDULE ๐Ÿ—“๏ธ
    Set how often you want to receive your spending report (e.g., weekly, monthly).
    
  • On Get Recent Data from Notions:
    ๐Ÿ“Š FETCHING DATA FOR REPORT ๐Ÿ“Š
    - Retrieves transactions from Notion for the report period.
    - Default: "Past Week". Adjust filter as needed.
    - Requires Notion API credentials & Database ID.
    
  • On Summarize Transaction Data:
    โž• SUMMARIZING SPENDING โž•
    Aggregates your expenses, usually by category,
    to prepare for the chart.
    
  • On Convert Data to JSON chart payload (Code Node):
    ๐ŸŽจ PREPARING CHART DATA ๐ŸŽจ
    This Code node formats the summarized data
    into the JSON structure needed by QuickChart.
    
  • On Generate Chart (QuickChart Node):
    ๐Ÿ“ˆ GENERATING VISUAL REPORT ๐Ÿ“ˆ
    Creates the actual chart image based on your spending data.
    You can customize chart type (bar, pie, etc.) here.
    
  • On Send Chart Image to Group or Private Chat:
    ๐Ÿ“ค SENDING REPORT TO TELEGRAM ๐Ÿ“ค
    - Delivers the generated chart to your chosen Telegram chat/group.
    - Set the correct Chat ID and Bot API token.
    
  • General Sticky Note (Place where relevant):
    ๐Ÿ”‘ CREDENTIALS NEEDED ๐Ÿ”‘
    Remember to set up API keys/tokens for:
    - Telegram
    - Google Gemini
    - Notion
    
  • General Sticky Note (Place where relevant):
    ๐Ÿ’ก CUSTOMIZE ME! ๐Ÿ’ก
    - Adjust AI prompts for better accuracy.
    - Change Notion database structure.
    - Modify report frequency and content.
    

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 - Google Gemini Chat Model

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

Block 2 - Basic LLM Chain

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

Block 3 - Sticky Note

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

Block 4 - Sticky Note1

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

Block 5 - Schedule Trigger | for send chart report

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

Block 6 - Get Recent Data from Notions

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

Block 7 - Summarize Transaction Data

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

Block 8 - Generate Chart

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

Block 9 - Send Chart Image to Group or Private Chat

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

Block 10 - Convert Data to JSON chart payload

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

Block 11 - Telegram Trigger | When recive photo

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

Block 12 - Get Image Info

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

Block 13 - Parse To your object | Table

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

Block 14 - Split Out | data transaction

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

Block 15 - Sendback to chat and give summarize text

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

Block 16 - Record To Notion Database

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

Block 17 - Sticky Note2

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

Block 18 - Sticky Note3

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

Block 19 - Sticky Note4

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

Block 20 - Sticky Note5

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

Block 21 - Sticky Note6

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

Block 22 - Sticky Note7

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

Block 23 - Sticky Note8

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

Block 24 - Sticky Note9

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

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

3. Summary Table

Workflow Automated financial tracker: Telegram invoices to Notion with Gemini AI reports
Complexity advanced
Nodes 28
Categories Invoice Processing, AI Summarization
Author Rizqi Pratama Ramadhani
Published 09 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3960/3960.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 Automated financial tracker: Telegram invoices to Notion with Gemini AI reports do?

Automated Financial Tracker: Telegram Invoices to Notion with AI Summaries & Reports Tired of manually logging every expense? Streamline your financial tracking with this powerful n8n workflow! Sna...

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 Invoice Processing, AI Summarization use case.