Automate calorie tracking by analyzing food images uploaded via Telegram, estimating ingredients using Vision AI, and sending a detailed nutritional report via Gmail using this robust n8n workflow.
Download this n8n workflow template and start using it instantly.
This advanced n8n workflow template solves the challenge of manually logging food intake by leveraging powerful Vision AI. When a user sends a photo of a meal through the Telegram messaging app, this specific n8n workflow instantly analyzes the image. It uses a vision-capable Large Language Model (LLM) to identify ingredients, estimate portion sizes in grams, calculate individual and total calories, and provide a simple nutritional evaluation. The crucial element of this n8n automation is the use of a Structured Output Parser, which guarantees the AI's complex response is always delivered in a clean JSON format, preventing errors in subsequent steps. The final, user-friendly report is then automatically formatted using a Code n8n node into a polished HTML email and delivered via Gmail, providing a seamless, automated tracking experience. This demonstrates a highly effective use case for serverless AI within an n8n environment.
This comprehensive n8n workflow initiates with a dedicated n8n trigger.
Telegram Trigger n8n node detects a new message containing a photo. This n8n trigger downloads the image file and passes its ID forward.AI Agent - 食材分析 n8n node receives the image file ID. It uses a detailed system message and a Japanese-language prompt, instructing the agent (powered by the OpenRouter Chat Model n8n node) to act as a nutrition expert. It specifically asks for the dish name, ingredient list (with amounts and calories), total calories, and a nutrition assessment.Structured Output Parser n8n node, connected to the AI agent, enforces a strict JSON schema on the LLM's output. This ensures the data—including the dishName, ingredients array, and totalCalories—is perfectly structured for downstream processing.Format for Gmail Code n8n node consumes the clean JSON data. It dynamically generates a professional, styled HTML body for the email, complete with tables for ingredients and dedicated sections for the calorie total and nutritional evaluation.Send a message1 Gmail n8n node uses the subject and HTML body created in the previous step to dispatch the complete calorie estimation report to the specified recipient's inbox, concluding the execution of this n8n automation.To deploy this powerful n8n workflow, follow these steps:
Telegram Trigger n8n node with your Telegram API credentials. Ensure the webhook is active and listening for messages (specifically image updates).OpenRouter Chat Model n8n node with your OpenRouter API credentials (or switch this node to an OpenAI Chat node if using GPT-4o). Ensure the selected model has vision capabilities.Send a message1 Gmail n8n node using OAuth2 credentials. Update the 'Send To' field with the desired email recipient for the reports. Telegram Trigger (n8n trigger): Initiates the n8n workflow upon receiving an image message. Key configuration: Set to listen for message updates and includes the download: true option to ensure the file is accessible for the AI.
AI Agent - 食材分析 (Langchain Agent n8n node): The core intelligence node. It combines the image input with a detailed, expert system prompt designed to analyze the food and estimate nutritional values. It relies on the connected Language Model.
OpenRouter Chat Model (LLM n8n node): Provides the large language model and vision processing capability. Configured to use a vision-capable model (like openai/gpt-5-mini) with a low temperature (0.3) for stable, fact-based output.
Structured Output Parser (Langchain n8n node): Enforces a rigid JSON schema, ensuring the AI output always contains dishName, ingredients, totalCalories, and nutritionEvaluation. This is essential for reliability in any advanced n8n automation.
Format for Gmail (Code n8n node): A custom n8n node that transforms the raw, validated JSON data into a beautifully structured HTML email template, ready for sending.
Send a message1 (Gmail n8n node): The final action node. It takes the HTML body and subject generated by the Code n8n node and delivers the final calorie estimation report via email.
Use this powerful n8n workflow to automatically track Uber Eats expenses. It extracts price and store details from your Gmail via an n8n trigger and provides a one-click expense logging link via Slack. Ideal for saving time on manual accounting.

Use this comprehensive n8n workflow to integrate Fal.ai's Flux model for advanced AI image generation, automatically handling polling and securely uploading the final images to Google Drive. A perfect n8n template for creatives.

Generate a personalized email digest of hot Reddit posts using this advanced n8n workflow. Features multi-subreddit tracking, smart filtering, GPT-4o mini summarization, and Gmail delivery. Use this n8n template for automated content curation.

Use this n8n workflow to automatically detect special food menu changes in Google Sheets and notify customers instantly via WhatsApp, Email, and Twilio SMS. Boost engagement with n8n templates.

Analyze food photos using GPT-4o-mini Vision within this n8n workflow. It finds nearby restaurants via Google Places, recommends a culturally relevant book, and publishes the full summary to Slack. Find powerful n8n templates for complex automation.









































