A self-hosted AI agent that automates receipt capture, data extraction, logging, and spending analytics using Telegram, Gemini Vision, and Google Sheets.
The AI Agent automates personal finance tracking by capturing receipts via Telegram, extracting data with Gemini Vision, and logging expenses into Google Sheets. It stores receipt files in Google Drive and supports natural-language spending questions. It runs on a private, self-hosted n8n setup.
Key capabilities that automate expense capture and reporting.
Ingests receipts via Telegram or plain text.
Extracts date, amount, description, and category from receipts.
Classifies expenses into categories (Food, Transport, Subscriptions, etc.).
Logs records to Google Sheets with a link to the receipt.
Stores receipt files in Google Drive in a structured folder.
Answers natural-language spending questions and provides insights.
This AI agent replaces fragmented manual work with a predictable execution flow.
A simple 3-step flow any non-technical user can follow.
A Telegram message arrives; if it contains an image or PDF, it is uploaded to Google Drive and prepared for extraction; text inputs go to the query path for instant analysis.
Gemini Vision extracts date, amount, description, and category; the data is structured and sent to the logging AI agent. Text inputs are routed to the live query path.
Parsed data is appended to Google Sheets; a confirmation is sent. For text questions, a second AI agent uses the live sheet to answer with totals, breakdowns, and trends.
A realistic scenario showing capture, logging, and querying.
Scenario: At 7:42 PM you snap a restaurant receipt via Telegram. The AI Agent uploads the image to Google Drive, extracts the date, amount, and category, and logs a new row in Google Sheets with a receipt reference. Later, you ask 'How much did I spend on food last month?', and the AI Agent returns the total with a month-over-month comparison based on the live sheet data.
Roles that gain practical value from this AI agent.
Need private, automated expense capture for tax prep and receipts organization.
Centralize expense tracking across multiple projects and teams.
Gain quick visibility into category spend and trends without manual entry.
Automate monthly reconciliation and variance analysis against budgets.
Streamline data entry from receipts into ledgers.
Track expenses across locations with a single private dataset.
Tools wired into the AI agent to automate input, storage, and analysis.
Receives user inputs (receipts or questions) and triggers the AI agent flow.
Logs parsed expense data and stores a running ledger.
Stores receipt files in a dedicated folder for reference.
Performs OCR and extraction to derive date, amount, and description.
Orchestrates the AI agent flow and credentialed connections.
Concrete scenarios where the AI agent shines.
Common concerns with practical, detailed answers.
This AI Agent automates receipt capture, data extraction, expense logging, receipt storage, and natural-language spending queries. It accepts inputs from Telegram as images, PDFs, or plain text and processes them end-to-end: capture, extract, classify, log, and respond. The solution is built to run on an n8n-based workflow that you host yourself, ensuring data remains private and under your control.
Yes. The AI Agent is designed to run within a private, self-hosted n8n environment. It does not require permanent cloud hosting for data processing, and credentials stay in your control. This setup reduces exposure to external services while still providing full automation of receipts, logging, and querying.
Receipts and images are stored in Google Drive, while parsed expense data is written to Google Sheets. The two storage systems stay within your Google account. If you enable the Gemini API, textual extractions happen within Gemini and are not published externally. You can audit all records from Sheets and Drive within your own account.
Gemini Vision provides high OCR accuracy for structured items on typical receipts but may struggle with poor image quality, unusual formats, or hand-written notes. For complex receipts, the AI agent flags uncertain extractions for review. You can retrain or re-run extractions to improve precision over time, and you can adjust categories manually if needed.
Yes. The AI agent supports handwritten receipts using Gemini Vision for OCR and can extract structured data from PDFs using text extraction. PDFs with scanned images rely on OCR to retrieve line items, while text-based PDFs are parsed directly. In all cases, the results are normalized into a consistent format before logging.
You need an n8n instance (self-hosted or cloud), a Telegram bot, and a Google account. Create credentials for Google Sheets and Drive, enable Gemini API, and have the spreadsheet and Drive folder IDs handy. Import the provided AI agent workflow into n8n, wire credentials, and activate. After setup, you can start feeding receipts or asking questions right away.
Data never leaves your environment if you stay self-hosted. Credentials are stored securely within your n8n instance, and you control access to your Google Sheets and Drive data. You can implement network restrictions and encryption as you see fit. The architecture is designed to minimize exposure while providing complete automation of receipts, storage, and queries.
A self-hosted AI agent that automates receipt capture, data extraction, logging, and spending analytics using Telegram, Gemini Vision, and Google Sheets.