Skip to main content

Log meal nutrients from Telegram to Google Sheets using an AI agent

Workflow preview

Workflow preview
100%
Log meal nutrients from Telegram to Google Sheets using an AI agent preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 ...

Best for

  • Personal Productivity automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.limit, n8n-nodes-base.telegramtrigger, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by PollupAI.

Original n8n.io source

1.1 Workflow description

Title
Log meal nutrients from Telegram to Google Sheets using an AI agent
Workflow name
Log meal nutrients from Telegram to Google Sheets using an AI agent

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 wants to capture their meal data via voice or text, without manually entering everything into a spreadsheet.

What problem is this workflow solving?

Manually logging meals and breaking down their nutritional content is time-consuming and often skipped. This workflow automates that process using Telegram for input, OpenAI for natural language understanding, and Google Sheets for structured tracking. It enables users to record meals by typing or sending voice messages, which are transcribed, analyzed for nutrients, and automatically stored for tracking and review.

What this workflow does

This n8n automation lets users send either a text or voice message to a Telegram bot describing their meal. The workflow then:

  1. Receives the Telegram message
  2. Checks if it’s a voice message • If yes: Downloads the audio file and transcribes it using OpenAI • If no: Uses the text input directly
  3. Sends the meal description to OpenAI to extract a structured list of ingredients and nutritional details
  4. Parses and stores the results in Google Sheets
  5. Responds via Telegram with a personalized confirmation message

A testing interface also allows you to simulate prompts and view structured outputs for development or debugging.

Setup

  1. Create a Telegram bot via BotFather and note the API token.
  2. Create an empty Google Sheet and store the sheet ID in the environment.
  3. Set up your OpenAI credentials in the n8n credential manager.
  4. Customize the “List of Ingredients and Nutrients” node with your prompt if needed.
  5. (Optional) Use the “Testing” section to simulate messages and refine outputs before going live.

How to customize this workflow to your needs

• Enhance prompts in the OpenAI node to improve the structure and accuracy of responses. • Add new fields in the Google Sheet and corresponding logic in the parser if you want more detail. • Adjust the Telegram response to provide motivational feedback, dietary tips, or summaries. • Upgrade to the “Pro” version mentioned in the contact section for USDA database integration and complete nutrient breakdowns.

This is a lightweight, AI-powered meal logging automation that transforms voice or text into actionable nutrition data—perfect for making healthy eating easier and more data-driven.

See my other workflows here

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 4 - Get Audio File

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 5 - Transcribe Recording

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.6

Block 6 - Limit

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 7 - Receive Telegram message

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 8 - If it's a voice message

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Set chatInput from message

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Set chatInput from voice

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - List of Ingredients and nutrients

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 12 - Explode the list

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 13 - Add date

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Store in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 15 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Respond message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 23 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Log meal nutrients from Telegram to Google Sheets using an AI agent
Complexity advanced
Nodes 23
Categories Personal Productivity, AI Summarization
Author PollupAI
Published 18 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3599/3599.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Log meal nutrients from Telegram to Google Sheets using an AI agent do?

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 ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Personal Productivity, AI Summarization use case.