Skip to main content

Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets

Workflow preview

Workflow preview
100%
Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets preview
Open on n8n.io

Important notice

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

1. Workflow Overview

AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food in...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.switch, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.chainllm, 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 Oka Hironobu.

Original n8n.io source

1.1 Workflow description

Title
Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets
Workflow name
Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets

AI Meal Nutrition Tracker with LINE and Google Sheets

Who's it for

This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting.

It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE.

What it does

This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking.

The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE.

How it works

  1. A single meal photo is sent to the LINE bot.
  2. The workflow is triggered via a LINE webhook.
  3. The image file is downloaded and sent to Google Gemini AI for food analysis.
  4. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber).
  5. A health score (1-10) is calculated with personalized improvement tips.
  6. The data is appended to Google Sheets for meal history tracking.
  7. The image is uploaded to Google Drive for reference.
  8. A formatted nutritional report with advice is sent back as a LINE reply.

This workflow is intentionally designed to handle one image per execution.

Requirements

To use this workflow, you will need:

  • A LINE Messaging API account
  • A Google Gemini API key
  • A Google account with access to Google Sheets and Google Drive
  • A Google Sheets document with the following column names:
    • Date
    • Time
    • Meal Type
    • Food Items
    • Calories
    • Protein (g)
    • Carbs (g)
    • Fat (g)
    • Fiber (g)
    • Health Score
    • Advice
    • Image URL

Important limitations

  • This workflow does not support multiple images sent in a single message.
  • Sending images in quick succession may trigger multiple executions and lead to unexpected results.
  • Only the first image in an event payload is processed.
  • Nutritional values are AI estimates based on visual analysis and typical serving sizes.
  • Accuracy depends on image quality, lighting, and food visibility.
  • This tool should not replace professional dietary advice.

These limitations are intentional to keep the workflow simple and easy to understand.

How to set up

  1. Create a LINE Messaging API channel and obtain a Channel Access Token.
  2. Generate a Google Gemini API key.
  3. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal.
  4. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive.
  5. Register the n8n webhook URL in your LINE channel settings.
  6. Activate the workflow in n8n and test it with a single meal photo.

How to customize

  • Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.).
  • Adjust the daily calorie goal in the Config node to match individual needs.
  • Add additional nutritional fields such as sodium, sugar, or vitamins.
  • Replace Google Sheets with a fitness app API or database.
  • Integrate with other services to send daily/weekly nutrition summaries.

Note:
This workflow was tested using real meal photos sent individually via the LINE Messaging API.
Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.

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 - Workflow Overview

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

Block 2 - Step 1 - Trigger & Config

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

Block 3 - Step 2 - Image Processing

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

Block 4 - Step 3 - Data Storage

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

Block 5 - Step 4 - Response

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

Block 6 - LINE Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 7 - Config

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

Block 8 - Check If Image

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 9 - Download Image from LINE

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 10 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 11 - Analyze Meal with AI

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 12 - Check Analysis Result

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

Block 13 - Parse Nutrition Data

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

Block 14 - Notify Not Food Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 15 - Merge Data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 16 - Upload to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 17 - Save to Google Sheets

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

Block 18 - Reply to LINE

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

3. Summary Table

Workflow Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets
Complexity advanced
Nodes 18
Categories Personal Productivity, AI Chatbot
Author Oka Hironobu
Published 02 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12380/12380.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 Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets do?

AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food in...

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 Chatbot use case.