Log Telegram meal photos and text to Google Sheets with Gemini nutrition analysis
Ready for 3.0What this workflow does
This AI workflow has 40 nodes and runs on Telegram events (message) (plus 2 other triggers). Along the way it connects Telegram, Google Gemini Chat Model and Google Sheets.
How it runs
Trigger: On Telegram events (message) (plus 2 other triggers).
- Config (Edit Fields (Set)): sets 1 field: sheet_id
- Config (Every evening at 9pm) (Edit Fields (Set)): sets 1 field: sheet_id
- Send error alert to Telegram (Telegram): uses Telegram
- Parse message (Code): runs custom JavaScript code
- Read everyone's targets (Google Sheets): uses Google Sheets
- Route by message type (Switch): routes items into 7 branches
- Read all meals (Google Sheets): uses Google Sheets
- Download photo from Telegram (Telegram): work with file
- Estimate meal from text (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini 3.5 Flash-Lite; output parser: Text nutrition JSON
- Read my meals for lookup (Google Sheets): uses Google Sheets
…plus 22 more steps. See the full node list below.
Services it uses
Other Google Gemini + Google Sheets templates (819) · Other Telegram + Google Sheets templates (674) · Other Telegram + Google Gemini templates (354)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Telegram
n8n-nodes-base.telegram - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Error Trigger
n8n-nodes-base.errorTrigger
From the author
Quick Overview This workflow listens for meal photos sent to a Telegram bot, uses Google Gemini Vision to estimate the dish and nutrition, logs each entry to a Google Sheets food diary, and replies in Telegram with the estimate plus the sender’s running…