Telegram Reciept Analyzer
Overview
This automation turns receipt photos into clean, structured summaries you can read at a glance or send back to customers in Telegram. Snap a picture of a receipt, share it with your Telegram bot, and the automation uses AI to extract the merchant, date, items, taxes, and totals—then replies with a nicely formatted breakdown. You can also call it directly through an API if you prefer. It’s built with FastAPI, taps into the Telegram Bot API for messages, and uses OpenAI’s vision capabilities to read receipts accurately.
Description
This automation analyzes receipt photos and returns a clean transaction summary by combining Telegram messages, AI technology, and a simple web API into a formatted response that’s easy to share. It first listens for receipt photos sent to your Telegram bot or accepts an image URL through the root API endpoint, then uses AI to read the image and pull out the merchant, items, taxes, and totals in a structured way. In parallel, it handles both webhook and short-polling flows for Telegram so you can use whichever setup fits your environment. After processing the image and formatting the results, it replies right in Telegram or returns a JSON response, producing a clear transaction summary that saves time on manual data entry and makes expense tracking easier.
Key Features
Telegram receipt parsing: Send a photo to your bot and get an instant, readable summary.
AI-powered vision: Uses OpenAI’s vision model to extract merchants, dates, items, taxes, and totals from images.
Clean, chat-friendly output: Replies in Telegram with a tidy breakdown of items, amounts, and key details.
Direct API access: Post an image URL to the root endpoint and get structured results back as JSON.
Two Telegram modes: Works with webhooks or simple short polling—use what’s easiest for you.
Pipedream integration option: Send replies via Pipedream’s Telegram Bot API action when needed.
Error-aware formatting: Skips missing fields gracefully and focuses on the most useful details.
Logs for debugging: Helpful logging around payloads, image handling, and response generation.
Instructions
Open the automation and connect your accounts: add your Telegram bot token and OpenAI API key.
Decide how you want to receive messages: set a Telegram webhook to the /webhook endpoint or use the /check-messages endpoint for short polling.
Test it with an image URL: POST to the root endpoint (/) with a receipt image URL to confirm AI parsing works.
Send a real receipt: In Telegram, send a receipt photo to your bot and wait for the formatted reply.
Review the results: Check the item list, subtotal, tax, and total; forward or copy the summary as needed.
Tweak and try again: If fields are missing, resend a clearer photo or a different angle for better extraction.
Use Cases
This automation is perfect for anyone who collects receipts and wants quick, accurate summaries without typing—think small business owners, finance teams, bookkeepers, and frequent travelers. It’s also great for support or operations teams that need to confirm totals and taxes from customer uploads, or for expense-tracking workflows where a fast, chat-friendly breakdown makes reviews easier.
Frequently Asked Questions
Last updated