Skip to main content

Log food calories from images to Google Sheets using LINE and OpenAI Vision

Workflow preview

Workflow preview
100%
Log food calories from images to Google Sheets using LINE and OpenAI Vision preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This workflow allows a LINE user to send either text or an image of food to a connected LINE bot. If text is sent, the AI agent responds directly via LINE. If an image is sent, the workflow downloa...

Best for

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

Tools used

n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.code, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by kote2.

Original n8n.io source

1.1 Workflow description

Title
Log food calories from images to Google Sheets using LINE and OpenAI Vision
Workflow name
Log food calories from images to Google Sheets using LINE and OpenAI Vision

This workflow allows a LINE user to send either text or an image of food to a connected LINE bot.

If text is sent, the AI agent responds directly via LINE.

If an image is sent, the workflow downloads it from LINE’s API, analyzes it using OpenAI’s Vision model, estimates calories (only if the image contains food), and formats the result into JSON.

Detected dishes and calories are appended to a Google Sheet, and a confirmation message is sent back to the user via LINE.

Key Features:

Integrates LINE Messaging API webhook with n8n

Uses OpenAI Vision to detect food and estimate calories

Automatically logs results into Google Sheets

Sends real-time feedback to the LINE user

How to use:

Set up a LINE Messaging API channel and get your channel access token.

Add your OpenAI API credentials in n8n.

Replace placeholders for {channel access token}, {your id}, and Google Sheet IDs with your own.

Activate the workflow and send a food image or text message to your LINE bot.

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 - Switch

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

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 5 - Edit Fields1

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

Block 6 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 7 - Code

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

Block 8 - Append row in sheet

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

Block 9 - Code1

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

Block 10 - LINE webhook

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

Block 11 - user verification

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

Block 12 - images download

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

Block 13 - only message

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

Block 14 - send LINE

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

Block 15 - Sticky Note

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

Block 16 - Sticky Note1

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

Block 17 - Sticky Note2

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

3. Summary Table

Workflow Log food calories from images to Google Sheets using LINE and OpenAI Vision
Complexity advanced
Nodes 17
Categories Personal Productivity, Multimodal AI
Author kote2
Published 11 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7228/7228.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 Log food calories from images to Google Sheets using LINE and OpenAI Vision do?

This workflow allows a LINE user to send either text or an image of food to a connected LINE bot. If text is sent, the AI agent responds directly via LINE. If an image is sent, the workflow downloa...

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, Multimodal AI use case.