Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Workflow Identifier: 1242
NODES in Use: telegramTrigger, telegram, editImage, lmChatGoogleGemini, chainLlm, outputParserStructured, splitOut, notion, summarize, code, scheduleTrigger, quickChart
Automate Telegram invoices with n8n and Notion

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow takes invoice photos sent in Telegram and turns them into detailed expense records in Notion automatically.
It solves the problem of spending many hours typing invoice details manually.
When a photo is received, AI reads the invoice data and saves each item in Notion.
Later, it sends you a clear spending report as a chart in Telegram.
This saves time and reduces entry mistakes.

The inputs are Telegram photos of invoices.
The process is extracting data with AI and saving it to Notion.
The outputs are new Notion expense entries and weekly Telegram reports with charts.
Each step is designed for easy automation without manual effort.


Tools and Services Used


Beginner Step-by-Step: How to Use This Workflow in n8n

Import the Workflow

  1. Inside n8n editor, click Import from File.
  2. Select the downloaded workflow file from this page.

Configure Credentials and IDs

  1. Add Telegram Bot API Key in the Telegram Trigger and Telegram nodes.
  2. Provide Google Gemini API Key in the Google Gemini Chat Model node.
  3. Set Notion API Key and connect to the correct expense database in the Record To Notion Database node.
  4. Update Telegram Chat ID where messages and reports get sent.

Review AI Prompt and Code

  1. Check the prompt in the Basic LLM Chain node matches your invoice categories.
  2. Copy the code in the chart payload node if edits needed; it formats data for the chart.

Test and Activate

  1. Send a test invoice photo to your Telegram bot to see if data appears in Notion.
  2. Manually trigger the schedule to check report sending.
  3. Activate the workflow to run continuously.

You can also visit self-host n8n if needing to run this workflow on your server.


Workflow Inputs, Processing, and Outputs

Inputs

  • Invoice photos sent via Telegram chat.
  • Scheduled timer to trigger reports weekly.

Processing Steps

  • Telegram Trigger catches incoming photo messages.
  • Telegram node downloads the photo file for processing.
  • Edit Image node validates the photo file.
  • Google Gemini Chat Model node runs AI to extract invoice fields.
  • Basic LLM Chain formulates the AI prompt for proper JSON output.
  • Parse To your object | Table node converts AI text into JSON.
  • Split Out node separates each expense item.
  • Record To Notion Database node adds items as pages.
  • Telegram node sends confirmation message back.
  • Scheduled trigger fetches recent expenses and summarizes by category.
  • Code node formats data for the chart.
  • Generate Chart node creates bar chart image.
  • Telegram node sends chart report.

Outputs

  • New detailed expense records saved in Notion.
  • Confirmation messages in Telegram chat.
  • Weekly spending summary charts delivered in Telegram.

Customization Ideas

  • Change AI prompt categories to better fit your spending habits.
  • Modify schedule trigger for report timing (daily, monthly).
  • Add extra Notion properties like vendor or payment type.
  • Switch chart type to pie or line by editing the chart payload code.

Common Issues and Fixes

Wrong Telegram photo file_id

Photo size array index may not be correct, causing “file_id” errors.
Check actual sizes in Telegram Trigger output and adjust the path accordingly.

AI output not fitting JSON schema

Error stemming from prompt and parser schema mismatch.
Double-check the Basic LLM Chain prompt and the Parse To your object | Table schema match exactly.

Notion API rate limits or failing to save entries

Too many rapid requests cause failures.
Add delay nodes or error workflows around Record To Notion Database node to slow requests down.


Pre-Production Checklist

  • Bot can read photos and send messages in target chat.
  • Google Gemini keys are valid with enough quota.
  • Notion database columns match mapped fields.
  • Test send invoice photo via Telegram, verify Notion entry.
  • Trigger schedule manually to check report generation.

Deployment Guide

Turn on the workflow to run continuously in n8n.
Check workflow logs for errors or stalled executions.
Ensure schedule trigger timing fits report delivery needs.

If deploying on own server, see self-host n8n for details.


Summary of Benefits and Outcomes

✓ Save 4+ hours weekly by automating invoice data entry.
✓ Reduce mistakes from manual typing.
✓ Get detailed and categorized expense data in Notion fast.
✓ Receive regular, clear spending reports as charts in Telegram.
✓ Focus more on business, less on bookkeeping.


Automate Telegram invoices with n8n and Notion

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The Telegram Trigger node listens for new message updates in the configured chat that include photo media. It activates when a photo message arrives.
The AI prompt in the Basic LLM Chain node and the JSON schema in the Parse node must exactly match in fields and format to parse successfully. Adjust either prompt or schema for alignment.
Add delay nodes to space out requests or enable error workflow handling in the Record To Notion Database node to manage retries or throttling.
Yes. Modify the code in the Convert Data to JSON chart payload node to specify ‘pie’ chart type and adjust dataset formatting accordingly.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.