Log LINE receipt photos to Google Sheets using OpenAI
Needs changesWhat this workflow does
This workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets. It also calls api.line.me and api.openai.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Configure Workflow Settings (Edit Fields (Set)): sets 5 fields: SPREADSHEET_ID, SHEET_NAME, OPENAI_MODEL…
- Validate Receipt Image Message (If): checks a condition and branches into true / false
- Download Receipt Image from LINE (HTTP Request): calls an HTTP API
- Request Receipt Image on LINE (HTTP Request): calls api.line.me (POST)
- Convert Receipt Image to Base (Convert to/from binary data): uses Convert to/from binary data
- Send Processing Error to LINE (HTTP Request): calls api.line.me (POST)
- Extract Receipt Data with OpenAI (HTTP Request): calls api.openai.com (POST)
- Validate and Sanitize Receipt Data (Code): runs custom JavaScript code
- Save Receipt to Google Sheets (Google Sheets): append or update
- Send Success Reply to LINE (HTTP Request): calls api.line.me (POST)
Services it uses
HTTP calls to: api.line.me, api.openai.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Convert to/from binary data in Convert Receipt Image to Base64: replace with Convert to File or Extract from File.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Convert to/from binary data Convert Receipt Image to Base64 | Convert to File or Extract from File |
Nodes used (7)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Convert to/from binary data
n8n-nodes-base.moveBinaryData - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow receives receipt photos from LINE via webhook, uses OpenAI to extract structured expense details, and appends or updates a Google Sheets expense log using the LINE message ID to prevent duplicates, then replies in LINE with a…