Imagine sending a photo of your meal to a Telegram bot – and instantly getting back the calories, protein, carbs, and fats. That’s exactly what I built using n8n and OpenAI’s GPT-4o-mini, customized with real food data. **
**What it does:
- You send a meal photo to the Telegram bot
- The image is analyzed by a custom-trained GPT-4o-mini model
- You get a clear macro breakdown: calories, protein, carbs, and fats
How I built it:
Telegram Trigger (n8n)
I used the Telegram Bot node in n8n to receive meal photos.
Telegram API File Fetching
Telegram only gives you a file_id – so I used the Telegram API to fetch the actual image URL.
Custom GPT-4o-mini Model
Instead of a pre-trained API, I used OpenAI’s GPT-4o-mini and fine-tuned the prompts using custom food libraries (covering Indian, Western, and packaged foods). This allowed the model to better recognize regional meals and give realistic macro estimations.
Prompt Crafting
The prompt I used included meal-type context and nutrition lookup logic based on trained libraries. This made GPT-4o-mini behave more like a smart nutritionist.
Response Parsing + Return
I parsed the output and sent back a clear, well-formatted macro summary via Telegram.
Try it here - https://t.me/coach09bot
⚠️ Friendly heads-up: I built this project entirely using free tools – so it has its limits.
If the bot doesn't respond or breaks under load, don’t worry – just ping me, and I’ll sort it out. 😊
Now you can build these kinds of AI-powered automations yourself — without writing a single line of code.
💬 Hit me up if you need any help!
Top comments (0)