Telegram to Google Sheets, effortless meal logs
Meal tracking usually falls apart the same way. You start strong, then the logging gets annoying, the data gets messy, and “I’ll do it later” turns into three missed days.
Telegram meal logs hit home for Coaches who need clients to actually follow through. Founders and busy marketers feel it too, because no one wants another app or another spreadsheet tab to keep up with.
This n8n workflow turns Telegram into a lightweight nutrition assistant. You’ll see how it captures meals from text, voice, or photos, writes clean rows to Google Sheets, and sends a clear daily progress summary back to you.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Telegram to Google Sheets, effortless meal logs
flowchart LR
subgraph sg0["Telegram Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Download Voice Message"]
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Input Message Router1", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "get_message (text)", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Download IMAGE"]
n4@{ icon: "mdi:robot", form: "rounded", label: "Analyze image", pos: "b", h: 48 }
n5@{ icon: "mdi:robot", form: "rounded", label: "Analyze voice message", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "get_message (Audio/Video mes..", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "get_message (Media message)", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Typing…"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Fix mime"]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Fix mime5"]
n11@{ icon: "mdi:swap-vertical", form: "rounded", label: "get_error_message1", pos: "b", h: 48 }
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send a text message"]
n13@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n14@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory", pos: "b", h: 48 }
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>MarkdownV2"]
n16@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n17@{ icon: "mdi:database", form: "rounded", label: "Registered?", pos: "b", h: 48 }
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send a text message1"]
n19@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model1", pos: "b", h: 48 }
n20@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory1", pos: "b", h: 48 }
n21["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>MarkdownV"]
n24@{ icon: "mdi:swap-vertical", form: "rounded", label: "get_message (register)", pos: "b", h: 48 }
n25@{ icon: "mdi:database", form: "rounded", label: "Register User", pos: "b", h: 48 }
n26@{ icon: "mdi:robot", form: "rounded", label: "Register Agent", pos: "b", h: 48 }
n27@{ icon: "mdi:robot", form: "rounded", label: "Cal IA Agent", pos: "b", h: 48 }
n28@{ icon: "mdi:database", form: "rounded", label: "Update Profile Data", pos: "b", h: 48 }
n29@{ icon: "mdi:database", form: "rounded", label: "Get Profile Data", pos: "b", h: 48 }
n30@{ icon: "mdi:wrench", form: "rounded", label: "Get Report", pos: "b", h: 48 }
n31@{ icon: "mdi:database", form: "rounded", label: "Append Meal Data", pos: "b", h: 48 }
n37["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram Trigger"]
n16 --> n1
n16 --> n24
n9 --> n5
n10 --> n4
n21 --> n18
n30 -.-> n27
n15 --> n12
n17 --> n16
n27 --> n15
n4 --> n7
n25 -.-> n26
n14 -.-> n27
n3 --> n10
n26 --> n21
n20 -.-> n26
n31 -.-> n27
n29 -.-> n27
n37 --> n17
n37 --> n8
n11 --> n27
n2 --> n27
n28 -.-> n27
n5 --> n6
n1 --> n2
n1 --> n0
n1 --> n3
n1 --> n11
n0 --> n9
n24 --> n26
n13 -.-> n27
n19 -.-> n26
n7 --> n27
n6 --> n27
end
subgraph sg1["Get report Flow"]
direction LR
n22@{ icon: "mdi:database", form: "rounded", label: "Get Meals Info", pos: "b", h: 48 }
n23@{ icon: "mdi:database", form: "rounded", label: "Get User Info", pos: "b", h: 48 }
n32@{ icon: "mdi:swap-vertical", form: "rounded", label: "Get Data", pos: "b", h: 48 }
n33["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Get chart message"]
n34["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Unify data"]
n35@{ icon: "mdi:play-circle", form: "rounded", label: "Get report", pos: "b", h: 48 }
n36@{ icon: "mdi:swap-vertical", form: "rounded", label: "Send back message", pos: "b", h: 48 }
n38["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge"]
n38 --> n33
n32 --> n34
n35 --> n22
n35 --> n23
n34 --> n38
n23 --> n38
n22 --> n32
n33 --> n36
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n37,n35 trigger
class n4,n5,n26,n27 ai
class n13,n19 aiModel
class n30 ai
class n14,n20 ai
class n1,n16 decision
class n17,n25,n28,n29,n31,n22,n23 database
class n9,n10,n15,n21,n33,n34 code
classDef customIcon fill:none,stroke:none
class n0,n3,n8,n9,n10,n12,n15,n18,n21,n37,n33,n34,n38 customIcon
The Problem: Meal tracking breaks when logging is a chore
Manual meal tracking sounds simple until you live with it. You eat something, then you have to remember what it was, estimate portions, open an app, search foods, adjust macros, and hope you didn’t pick the wrong “chicken bowl” from the list of fifty. Then you try to summarize the day, and it turns into more tapping. The real cost isn’t just time; it’s the mental friction that makes you stop logging at all. And once entries are inconsistent, the “daily report” becomes a vague guess instead of something you can act on.
It adds up fast. Here’s where it usually breaks down.
- Logging each meal takes about 5–10 minutes, so a normal day can quietly eat 30 minutes.
- Photo meals are the worst to capture cleanly, because you still end up typing the details later.
- Macros end up inconsistent when you switch between apps, notes, and “I’ll remember it.”
- You can’t get a reliable daily summary if half your meals never make it into the system.
The Solution: Log meals in Telegram, store clean data in Sheets
This workflow turns a Telegram chat into your input layer, and Google Sheets into your database. A message comes in (text, a voice note, or a food photo), the workflow routes it to the right handler, and an AI model interprets what you ate. That interpretation gets normalized into consistent fields (meal description plus calories, protein, carbs, fats), then appended to a “Meals” table in Google Sheets. If you’re new, it also runs a simple registration flow to create a profile row with your calorie and protein targets, so the assistant has context. When you ask for a report (or when the report trigger runs), it pulls today’s meals and your targets, aggregates totals, builds a progress-style message, and sends it back in Telegram.
The workflow starts with a Telegram intake trigger, then checks whether you’re registered. From there it routes messages by type (text, voice, image), extracts nutrition details, and writes a clean row to Google Sheets. Finally, a reporting sub-workflow generates a daily summary that’s easy to understand in one glance.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you log 4 meals a day. Manually, if each entry takes about 7 minutes (searching foods, estimating macros, fixing mistakes), that’s roughly 30 minutes daily. With this workflow, you send a quick Telegram message or photo in about a minute per meal, then let the AI do the interpretation and the sheet logging in the background. Even if you wait a few minutes for transcription or image analysis, your hands-on time drops to about 5 minutes total. That’s about 25 minutes back every day, and the data is cleaner.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram to collect meal messages and media.
- Google Sheets to store profiles and meal logs.
- AI provider API key (get it from Google AI Studio for Gemini, or your LLM provider).
Skill level: Intermediate. You’ll connect credentials, create two Sheets tables, and adjust a couple of message prompts.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A Telegram message triggers the workflow. Your bot receives text, a voice note, or an image through the Telegram Trigger, then sends a quick “typing” indicator so the chat feels responsive.
The workflow checks if the user is registered. It looks you up in the Google Sheets “Profile” table. If you’re new, a registration assistant collects your calorie and protein targets and appends a profile row.
Inputs are routed and interpreted. A Switch node routes by message type. Voice notes are fetched and transcribed, images are fetched and analyzed, and plain text is mapped directly into the AI agent context.
Meal entries and daily reports are produced. For logging, the workflow appends a row to the “Meals” table (description plus macros). For reporting, a report trigger pulls meals and targets, totals the day, builds a readable progress message, then sends it back to Telegram.
You can easily modify the targets you track (for example, add carbs or fats goals) to match your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Telegram Trigger
This workflow starts when a Telegram message arrives and immediately branches to registration lookup and typing indicator in parallel.
- Add the Telegram Intake Trigger node.
- Credential Required: Connect your telegramApi credentials.
- Set Updates to
message. - Confirm the execution flow: Telegram Intake Trigger outputs to both Lookup Registration and Send Typing Indicator in parallel.
Step 2: Connect Google Sheets
Google Sheets powers user profiles and meal logs, and it also supports AI tools for registration and meal storage.
- Open Lookup Registration and set Document ID to
[YOUR_ID]and Sheet Name toProfile. - Ensure the Filters in Lookup Registration use
{{$('Telegram Intake Trigger').item.json.message.chat.id}}mapped to User_ID. - Configure Retrieve Meal Records with Document ID
[YOUR_ID]and Sheet NameMeals, and add filters for{{$json.Date}}and{{$json.User_ID}}. - Configure Retrieve Profile Records with Document ID
[YOUR_ID]and Sheet NameProfile. - Credential Required: Connect your googleSheetsOAuth2Api credentials to Lookup Registration, Retrieve Meal Records, and Retrieve Profile Records.
- Connect the same googleSheetsOAuth2Api credentials to all Google Sheets tool nodes: Append Profile Row, Update Profile Targets, Fetch Profile Targets, and Append Meal Entry.
[YOUR_ID] unchanged will cause all Google Sheets nodes to fail. Replace it with your actual spreadsheet ID.Step 3: Set Up Registration Routing
Incoming chats are checked against the Profile sheet to route new users to registration or existing users to intake processing.
- In Check Registration, keep the condition that checks
{{$json.User_ID}}exists. - Connect Lookup Registration → Check Registration → Route Incoming Message (registered users) and Map Registration Text (new users).
- In Map Registration Text, set message to
{{$('Telegram Intake Trigger').item.json.message.text}}and chat_id to{{$('Telegram Intake Trigger').item.json.message.chat.id}}. - Keep the flow Map Registration Text → Registration Assistant → Format Markdown Reg → Dispatch Registration Reply.
Step 4: Configure Intake Routing and Media Handling
The workflow routes text, voice, image, or unsupported files and prepares consistent payloads for the AI coach.
- In Route Incoming Message, keep the three rules that check for
{{$('Telegram Intake Trigger').item.json.message.text}},{{$('Telegram Intake Trigger').item.json.message.voice}}, and{{$('Telegram Intake Trigger').item.json.message.photo[0].file_id}}. - For text: ensure Map Text Payload sets message to
{{$('Telegram Intake Trigger').item.json.message.text}}and chat_id to{{$('Telegram Intake Trigger').item.json.message.chat.id}}. - For voice: configure Fetch Voice File with File ID
{{$('Telegram Intake Trigger').item.json.message.voice.file_id}}then connect to Normalize MIME Audio → Interpret Audio Message → Map Audio Payload. - For image: configure Fetch Image File with File ID
{{$('Telegram Intake Trigger').item.json.message.photo[3]?.file_id || $('Telegram Intake Trigger').item.json.message.photo[2]?.file_id || $('Telegram Intake Trigger').item.json.message.photo[1]?.file_id}}then connect to Normalize MIME Image → Interpret Image Nutrition → Map Image Payload. - For unsupported files: keep Map Unsupported File Notice passing the fallback message to Nutrition Coach Agent.
- Credential Required: Connect your telegramApi credentials to Fetch Voice File, Fetch Image File, and Send Typing Indicator.
Step 5: Set Up AI Models and Memory
The workflow uses Gemini for media interpretation and two AI agents for registration and coaching.
- Credential Required: Connect your googlePalmApi credentials to Interpret Image Nutrition and Interpret Audio Message.
- Credential Required: Connect your googlePalmApi credentials to Gemini Chat Model and Gemini Chat Model Reg.
- Ensure Gemini Chat Model is connected as the language model for Nutrition Coach Agent.
- Ensure Gemini Chat Model Reg is connected as the language model for Registration Assistant.
- Keep memory nodes attached to their parent agents: Conversation Memory connects to Nutrition Coach Agent and Registration Memory connects to Registration Assistant.
- For memory nodes, keep Session Key set to
{{$json.chat_id}}and Session ID Type set tocustomKey.
Step 6: Configure AI Tools for Sheets and Reports
AI tools let the agents append meals, update profiles, and generate reports without manual branching.
- In Append Meal Entry, confirm Date uses
{{$today.format("yyyy-LL-dd")}}and fields map from$fromAI()inputs. - In Append Profile Row and Update Profile Targets, keep the mapping that uses
{{$json.chat_id}}as User_ID and$fromAI()values for targets. - In Fetch Profile Targets, keep the lookup filter
{{$json.chat_id}}for User_ID. - In Run Daily Report, keep Workflow ID as
{{$workflow.id}}and inputs{{$fromAI('Date', ``, 'string')}}plus{{$json.chat_id}}. - Remember these are AI tools: credentials are applied to the tool nodes themselves, while the calling agent is Nutrition Coach Agent or Registration Assistant.
Step 7: Configure Daily Report Branch
The daily report is a parallel data fetch that merges meals and profile records to produce a formatted summary.
- Confirm the parallel branch: Report Trigger outputs to both Retrieve Meal Records and Retrieve Profile Records in parallel.
- Keep Retrieve Meal Records → Extract Meal Totals → Aggregate Nutrition Totals.
- Keep Aggregate Nutrition Totals and Retrieve Profile Records merging in Combine Report Data.
- Connect Combine Report Data → Build Report Message → Prepare Report Reply.
Step 8: Configure Telegram Output Formatting
Both the registration flow and the coaching flow format messages safely for Telegram MarkdownV2 before sending.
- Keep Nutrition Coach Agent → Format MarkdownV2 → Dispatch Telegram Reply.
- Keep Registration Assistant → Format Markdown Reg → Dispatch Registration Reply.
- In Dispatch Telegram Reply and Dispatch Registration Reply, set Text to
{{$json.message}}and Chat ID to{{$('Telegram Intake Trigger').item.json.message.chat.id}}. - Credential Required: Connect your telegramApi credentials to Dispatch Telegram Reply and Dispatch Registration Reply.
Step 9: Test and Activate Your Workflow
Validate both the registration and coaching branches with sample Telegram messages and a report request.
- Click Execute Workflow and send a Telegram text message to trigger Telegram Intake Trigger.
- Send a photo and a voice note to verify Fetch Image File → Interpret Image Nutrition and Fetch Voice File → Interpret Audio Message paths.
- Confirm successful output: Dispatch Telegram Reply should send MarkdownV2-safe responses.
- Trigger a report via the agent and verify Build Report Message creates a summary and Prepare Report Reply passes it through.
- When satisfied, toggle the workflow to Active for production use.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the n8n credential connection test and make sure the Google account can edit the sheet.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About an hour if you already have your Telegram bot and Google credentials ready.
No. You will mainly connect accounts and copy the provided Google Sheets column headers.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in AI API usage, which is usually a few cents per day for personal logging.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll change the reporting trigger. Swap the current report trigger behavior to run on a schedule, then adjust the “Retrieve Meal Records” query window and the “Build Report Message” formatting to summarize a week. Many teams also tweak the agent prompt so it highlights trends (like “protein low on weekends”) instead of day totals.
Usually it’s a bot token issue or the bot isn’t actually receiving updates. Confirm the token in your Telegram Trigger credentials, then send a fresh message to the bot and check n8n’s execution log to see if the trigger fired. If it fired but file downloads fail, the “Fetch Voice File” or “Fetch Image File” step may be missing permissions or referencing an expired file_id.
For a single person, it’s effectively unlimited.
Often, yes, if you want the AI assistant behavior. n8n handles branching logic (text vs. voice vs. image), conversation memory, and multi-step reporting without turning into a pricey chain of premium tasks. Zapier or Make can still work for basic “Telegram message to Google Sheets row,” but the moment you add transcription, image analysis, and a daily report, the workflow gets awkward. n8n is also easier to self-host, which matters if you’re running this for many users. If you’re deciding between tools, Talk to an automation expert and we’ll map it to your volume and budget.
Once this is running, logging becomes a quick message instead of a daily negotiation with yourself. The workflow handles the repetitive stuff, and you get clean data plus a report you can actually use.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.