Automation library · Data collection

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.

LargeCalls a model: Gemini

24 stepsLarge: read it before trusting it with anything live
7Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 2Logic 11Service 10

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2SwitchSwitchLogic
  3. 3IfIfLogic
  4. 4Download Image in Binary FormTelegramService
  5. 5Bot InstructionsTelegramService
  6. 6If2IfLogic
  7. 7Analyze an image & CaptionGoogle GeminiModel
  8. 8Get rows to add CaloriesGoogle SheetsService
  9. 9If3IfLogic
  10. 10Food CaloriesTelegramService
  11. 11If4IfLogic
  12. 12Number of rows to DeleteGoogle SheetsService
  13. 13Analyze TextGoogle GeminiModel
  14. 14If1IfLogic
  15. 15ADD all Calories of specific IDCodeLogic
  16. 16Zero CaloriesSetLogic
  17. 17If5IfLogic
  18. 18Algorithm to Store User InfoCodeLogic
  19. 19Total CaloriesTelegramService
  20. 20Extract Number of Rows to DeleteCodeLogic
  21. 21No Item ExistsTelegramService
  22. 22Store Food CaloriesGoogle SheetsService
  23. 23Delete rows of specific IDGoogle SheetsService
  24. 24Delete All DoneTelegramService

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.