Estimate meal calories from Telegram text and photos with Google Gemini
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Telegram Trigger
n8n-nodes-base.telegramTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Telegram
n8n-nodes-base.telegram - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Aggregate
n8n-nodes-base.aggregate - Calculator
@n8n/n8n-nodes-langchain.toolCalculator
What it does
Quick overview This Telegram bot workflow lets an authorized user send meal details as text or a photo, uses Google Gemini to describe images, then uses an n8n AI Agent to estimate calories and replies in Telegram. How it works 1. Triggers when your Telegram bot receives a message. 2. Checks the sender’s Telegram chat ID against an allowed chat ID and replies with an unauthorized message if it doesn’t match. 3. Routes authorized messages by type, handling photos and text while rejecting unsupported types (for example, voice messages). 4. For photos, downloads the image from Telegram and uses Google Gemini to generate a detailed text description of the meal. 5. Combines the user’s text (if present) with the Gemini image description and sends it to an n8n AI Agent that can use a calculator tool and conversation memory. 6. Sends the AI Agent’s calorie estimate back to the user in Telegram. Setup 1. Create a Telegram bot with BotFather and add a Telegram API credential in n8n for the Telegram Trigger and Telegram send/download actions. 2. Add Google Gemini credentials in n8n to power both the Gemini image analysis and the Gemini chat model used by the AI Agent. 3. Replace the placeholder value in the “Edit Fields” step with the Telegram chat ID you want to authorize. 4. If you want voice messages supported, add an audio transcription step and route the “Voice” path to it, otherwise keep the unsupported-message reply as-is.