# Smart calorie tracker with Gemini and Google Sheets: n8n workflow

> Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/smart-calorie-tracker-with-gemini-and-google-sheets (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Data collection](https://millionrounds.com/workflows?category=Data+collection#library)

# Smart calorie tracker with Gemini and Google Sheets

Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to Gemini. 24 steps, 7 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsmart-calorie-tracker-with-gemini-and-google-sheets)

**24 steps** Large: read it before trusting it with anything live

**7** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 2 Logic 11 Service 10

The steps in the order they run, from what starts it.

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **Switch** Switch *Logic*
- 3 **If** If *Logic*
- 4 **Download Image in Binary Form** Telegram *Service*
- 5 **Bot Instructions** Telegram *Service*
- 6 **If2** If *Logic*
- 7 **Analyze an image & Caption** Google Gemini *Model*
- 8 **Get rows to add Calories** Google Sheets *Service*
- 9 **If3** If *Logic*
- 10 **Food Calories** Telegram *Service*
- 11 **If4** If *Logic*
- 12 **Number of rows to Delete** Google Sheets *Service*
- 13 **Analyze Text** Google Gemini *Model*
- 14 **If1** If *Logic*
- 15 **ADD all Calories of specific ID** Code *Logic*
- 16 **Zero Calories** Set *Logic*
- 17 **If5** If *Logic*
- 18 **Algorithm to Store User Info** Code *Logic*
- 19 **Total Calories** Telegram *Service*
- 20 **Extract Number of Rows to Delete** Code *Logic*
- 21 **No Item Exists** Telegram *Service*
- 22 **Store Food Calories** Google Sheets *Service*
- 23 **Delete rows of specific ID** Google Sheets *Service*
- 24 **Delete All Done** Telegram *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 24, with 7 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, Telegram
- **Model:** Gemini

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets and Telegram accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 24 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 24 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsmart-calorie-tracker-with-gemini-and-google-sheets)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**AI Facebook ad spy tool with Apify and OpenAI** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-facebook-ad-spy-tool-with-apify-and-openai)
- [**AI-powered visual regression testing with Gemini and Linear** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-powered-visual-regression-testing-with-gemini-and-linear)
- [**Analyze commodity portfolio diversification with Sheets** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-commodity-portfolio-diversification-with-sheets)
- [**Detect visual regressions with Apify and Gemini** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/detect-visual-regressions-with-apify-and-gemini)
- [**Facebook ad library spy with OpenAI and Google Drive** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/facebook-ad-library-spy-with-openai-and-google-drive)
- [**From Google Drive to Instagram, TikTok & YouTube with Airtable** 24 steps · calls a model · Airtable, Google Drive](https://millionrounds.com/workflow/from-google-drive-to-instagram-tiktok-and-youtube-with-airta)
