Automation library · Data collection

Calory tracker & meal logger with Telegram and Gemini

Started by an incoming Telegram message, and works across Telegram and n8n data table. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 65 steps, 4 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: GeminiRetrieval

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

The flow

Starts it 2Model 21Logic 16Service 21

The steps in the order they run, from what starts it. The first 60 of 65.

  1. 1Simple MemoryMemory Buffer WindowModel
  2. 2Google Gemini Chat Model1Lm Chat Google GeminiModel
  3. 3Simple Memory1Memory Buffer WindowModel
  4. 4Telegram TriggerTelegram triggerStarts it
  5. 5Google Gemini Chat Model2Lm Chat Google GeminiModel
  6. 6Google Gemini Chat Model3Lm Chat Google GeminiModel
  7. 7Google Gemini Chat Model4Lm Chat Google GeminiModel
  8. 8Simple Memory2Memory Buffer WindowModel
  9. 9Simple Memory3Memory Buffer WindowModel
  10. 10Simple Memory4Memory Buffer WindowModel
  11. 11logMealAnalysis(tool)Tool WorkflowModel
  12. 12Register UserData Table ToolService
  13. 13Append Meal DataData Table ToolService
  14. 14fetchmealdetailsData Table ToolService
  15. 15updateMealData Table ToolService
  16. 16getUserDataData Table ToolService
  17. 17getDailyMealReportData Table ToolService
  18. 18Update Profile DataData Table ToolService
  19. 19Google Gemini Chat ModelLm Chat Google GeminiModel
  20. 20Set Update Profile StateData Table ToolService
  21. 21WebhookWebhookStarts it
  22. 22The Log Meal AgentAgentModel
  23. 23Register AgentAgentModel
  24. 24Typing…TelegramService
  25. 25Standardize InputSetLogic
  26. 26Cal AI Router AgentAgentModel
  27. 27Report AgentAgentModel
  28. 28Profile AgentAgentModel
  29. 29Update Meal Agent (Step 3 - Final Output)AgentModel
  30. 30Update Meal Agent (Step 1 - Ask for ID)AgentModel
  31. 31Update Meal Agent (Step 2 - Ask for Desc)AgentModel
  32. 32MarkdownV2CodeLogic
  33. 33MarkdownVCodeLogic
  34. 34Is User Registered?Data TableService
  35. 35Sequential RoutingSwitchLogic
  36. 36Re-Analyze MealGoogle GeminiModel
  37. 37MarkdownV3CodeLogic
  38. 38MarkdownV4CodeLogic
  39. 39Send a text messageTelegramService
  40. 40Send a text message1TelegramService
  41. 41IfIfLogic
  42. 42Input Message RouterSwitchLogic
  43. 43Parse AI OutputCodeLogic
  44. 44State-Setting Node #1Data TableService
  45. 45New Description State-Setting Node #2Data TableService
  46. 46Get Conversation StateData TableService
  47. 47get_message (register)SetLogic
  48. 48Analyze Text MessageGoogle GeminiModel
  49. 49Download Voice MessageTelegramService
  50. 50Download IMAGETelegramService
  51. 51get_error_messageSetLogic
  52. 52Save Updated MealData TableService
  53. 53Send a text message2TelegramService
  54. 54Send a text message3TelegramService
  55. 55Conversation State RouterSwitchLogic
  56. 56Format Text AnalysisSetLogic
  57. 57Fix mimeCodeLogic
  58. 58Fix mime5CodeLogic
  59. 59Clear the StateData TableService
  60. 60Merge2MergeLogic

How it's built

Starts on
An incoming Telegram message
Steps
65, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Telegram, n8n data table
Model
Gemini
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, plus your own Telegram account, 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. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 65 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 65 steps before you point it at anything that matters.