Category: Automations › Invoicing & Accounting · Best for: Freelancers and small businesses · Platform: n8n · Steps: 15
What it does
Send a bill photo on Telegram, and it's saved in Notion with an AI summary.
Automated Financial Tracker: Telegram Invoices to Notion with AI Summaries & Reports
Works with: Telegram, Gemini, Output Parser Structured, Notion, Chain Llm, Quick Chart
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Google Gemini Chat Model)
- Notion integration token: how to connect (used by Get Recent Data from Notions, Record To Notion Database)
- Telegram bot token from @BotFather: how to connect (used by Send Chart Image to Group or Private Chat, Telegram Trigger | When recive photo, Sendback to chat and give summarize text, Telegram)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Point these fields at your own sheets, chats and accounts:
- Get Recent Data from Notions →
databaseId: choose your own - Send Chart Image to Group or Private Chat →
chatId: choose your own - Sendback to chat and give summarize text →
chatId: choose your own - Record To Notion Database →
databaseId: choose your own
- Get Recent Data from Notions →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). Schedule Trigger | for send chart report starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- Schedule Trigger | for send chart report starts the workflow (Schedule).
- Telegram Trigger | When recive photo starts the workflow (Telegram).
- Google Gemini Chat Model uses AI (Gemini).
- Parse To your object | Table uses AI (Output Parser Structured).
- Get Recent Data from Notions uses Notion to databasePage getAll.
- Telegram uses Telegram to file.
- Basic LLM Chain uses AI (Chain Llm).
- Summarize Transaction Data uses Summarize.
- Get Image Info uses Edit Image to information.
- Split Out | data transaction uses Split Out.
- Sendback to chat and give summarize text uses Telegram.
- Convert Data to JSON chart payload reshapes the data for the next step.
- Record To Notion Database uses Notion to databasePage.
- Generate Chart uses Quick Chart.
- Send Chart Image to Group or Private Chat uses Telegram to sendPhoto.
India & US notes
India: add GSTIN, HSN/SAC and GST amount columns to your sheet so the AI extracts them too. US: add sales-tax and EIN columns as needed.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Automated Financial Tracker: Telegram Invoices to Notion with AI Summaries & Reports
Schedule report to send on chanel or private message
INVOICE INPUT Bot listens here for photos of your receipts/invoices. Ensure your Telegram Bot API token is set in credentials.
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.
STRUCTURING AI DATA Converts the AI's text output into a usable JSON object. Check the schema if you modify the AI prompt significantly.
SAVING TO NOTION
- Extracted transaction data is saved here.
- Configure with your Notion API key & Database ID.
- Map fields correctly to your database columns!
REPORTING SCHEDULE Set how often you want to receive your spending report (e.g., weekly, monthly).
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.
SUMMARIZING SPENDING Aggregates your expenses, usually by category, to prepare for the chart.
GENERATING VISUAL REPORT Creates the actual chart image based on your spending data. You can customize chart type (bar, pie, etc.) here.
SENDING REPORT TO TELEGRAM
- Delivers the generated chart to your chosen Telegram chat/group.
- Set the correct Chat ID and Bot API token.
TRANSACTION SUMMARY Sends a confirmation message back to the user in Telegram with a summary of the recorded expense.
CREDENTIALS NEEDED Remember to set up API keys/tokens for:
- Telegram
- Google Gemini
- Notion
CUSTOMIZE ME!
- Adjust AI prompts for better accuracy.
- Change Notion database structure.
- Modify report frequency and content.
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method