Back to Catalog

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

Oka HironobuOka Hironobu
89 views
2/3/2026
Official Page

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.

n8n Workflow: Track Meal Nutrition from Photos with LINE, Google Gemini, and Google Sheets

This n8n workflow automates the process of extracting nutritional information from meal photos, analyzing it with Google Gemini, and logging the data into a Google Sheet. It's designed for users who want to easily track their dietary intake by simply sending a photo of their meal.

What it does

This workflow streamlines nutrition tracking through the following steps:

  1. Receives a Meal Photo: It listens for incoming webhook requests, typically triggered by a user sending a meal photo via a messaging app like LINE (though the specific LINE trigger isn't in the provided JSON, it's implied by the directory name).
  2. Downloads the Image: It extracts the image URL from the incoming data and downloads the meal photo from Google Drive.
  3. Analyzes with Google Gemini: The downloaded image is sent to the Google Gemini Chat Model along with a prompt to describe the meal and provide nutritional information (e.g., calories, protein, carbs, fat).
  4. Extracts Nutritional Data: The response from Google Gemini is processed to extract the relevant nutritional details.
  5. Formats Data: The extracted nutritional data is then formatted into a structured format suitable for storage.
  6. Logs to Google Sheets: Finally, the formatted nutritional information (meal description, calories, protein, carbs, fat) is appended as a new row to a specified Google Sheet.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • Google Account: For Google Drive and Google Sheets.
    • Google Drive Credential: Configured in n8n to allow downloading images.
    • Google Sheets Credential: Configured in n8n to allow writing to a spreadsheet.
  • Google Gemini API Key/Access: Configured as a credential in n8n for the Google Gemini Chat Model.
  • Webhook Trigger: An external service (e.g., LINE, Telegram, etc.) configured to send image URLs to the n8n webhook URL.

Setup/Usage

  1. Import the Workflow: Import the provided JSON into your n8n instance.
  2. Configure Credentials:
    • Set up your Google Drive credential.
    • Set up your Google Sheets credential.
    • Set up your Google Gemini Chat Model credential.
  3. Configure Google Drive Node (Node 58):
    • Ensure the "Resource" is set to "File" and the "Operation" is "Download".
    • The "File ID" should dynamically pull the file ID from the incoming webhook data. This likely comes from a previous node that parses the webhook payload.
  4. Configure Google Gemini Chat Model Node (Node 1262):
    • Provide a clear prompt for Gemini to analyze the meal photo and extract nutritional data.
    • Ensure the image data from the Google Drive download is passed correctly to this node.
  5. Configure Edit Fields (Set) Node (Node 38):
    • Adjust the expressions to parse the output from the Google Gemini Chat Model and extract specific nutritional values (e.g., calories, protein, carbs, fat) and the meal description.
  6. Configure Google Sheets Node (Node 18):
    • Specify the "Spreadsheet ID" and "Sheet Name" where you want to log the nutritional data.
    • Ensure the "Operation" is set to "Append Row".
    • Map the fields from the "Edit Fields (Set)" node (e.g., Meal Description, Calories, Protein, Carbs, Fat) to the corresponding columns in your Google Sheet.
  7. Activate the Workflow: Once configured, activate the workflow.
  8. Trigger the Webhook: Configure your external application (e.g., LINE bot) to send an image URL to the "Webhook" node's URL when a user sends a meal photo. The webhook payload should contain the image URL or file ID that Google Drive can access.

Related Templates

Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API

Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) How to Use β€” Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➀ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen

RapiwaBy Rapiwa
183

Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack

πŸ“Š Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. πŸš€πŸ“šπŸ’¬ What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. πŸ“¦ Step 3: Logs release data into Google Sheets for record-keeping and analysis. πŸ“Š Step 4: Retrieves FAQ or documentation data from Notion. πŸ“š Step 5: Merges GitHub and Notion data to calculate documentation drift. πŸ” Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. πŸ”” Key Benefits βœ… Keeps SDK documentation aligned with product releases βœ… Prevents outdated information from reaching users βœ… Provides centralized release tracking in Google Sheets βœ… Sends real-time Slack alerts for overdue updates βœ… Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.

Rahul JoshiBy Rahul Joshi
31

Automate Gmail responses with GPT and human-in-the-loop verification

Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com

Nick CanfieldBy Nick Canfield
88