Log meal nutrients from Telegram to Google Sheets using an AI agent
Needs changesWhat this workflow does
This AI workflow has 15 nodes and runs on Telegram events (message, channel post) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Telegram, OpenAI and Google Sheets.
How it runs
Trigger: On Telegram events (message, channel post) (plus 1 other trigger).
- If: checks a condition and branches into true / false
- List of Ingredients and nutrients (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Get Audio File (Telegram): work with file
- Set chatInput from message (Edit Fields (Set)): sets 1 field: chatInput
- Explode the list (Split Out): splits a list into separate items
- Transcribe Recording (OpenAI): transcribe (audio)
- Add date (Code): runs custom JavaScript code
- Set chatInput from voice (Edit Fields (Set)): sets 1 field: chatInput
- Store in sheet (Google Sheets): append
- Limit: keeps the first few items
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in List of Ingredients and nutrients (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) List of Ingredients and nutrients (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Telegram
n8n-nodes-base.telegram - OpenAI
@n8n/n8n-nodes-langchain.openAi - Limit
n8n-nodes-base.limit - Telegram Trigger
n8n-nodes-base.telegramTrigger - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Split Out
n8n-nodes-base.splitOut - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets
From the author
Who is this for? This workflow is ideal for individuals focused on nutrition tracking, meal planning, or diet optimization—whether you’re a health-conscious individual, fitness coach, or developer working on a healthtech app. It also fits well for anyone who…