{"product_id":"line-receipt-expense-capture-with-gemini-drive-sheets-n8n","title":"LINE Receipt Expense Capture with Gemini, Drive \u0026 Sheets (n8n)","description":"\u003ch3\u003eCapture LINE receipt expenses automatically—Gemini extraction, Japanese invoice T-number validation, and Google Sheets logging via n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens for receipt photos sent through \u003cstrong\u003eLINE\u003c\/strong\u003e, extracts structured expense details with \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e, verifies Japanese invoice \u003cstrong\u003eT-numbers\u003c\/strong\u003e using the \u003cstrong\u003eNTA Web-API\u003c\/strong\u003e, then archives the image to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e and records the expense in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e. The user gets a confirmation reply back in LINE.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a POST webhook from LINE\u003c\/strong\u003e and reads the message type, message ID, reply token, and user ID.\u003c\/li\u003e\n  \u003cli\u003eIf the event is \u003cstrong\u003enot an image\u003c\/strong\u003e, it replies in LINE instructing the user to send a \u003cstrong\u003ereceipt photo\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eFor \u003cstrong\u003eimage messages\u003c\/strong\u003e, it downloads the image from LINE, \u003cstrong\u003euploads it to Google Drive\u003c\/strong\u003e, and converts the file to \u003cstrong\u003eBase64\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eSends the image to \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e to determine whether it’s a receipt and to extract: \u003cstrong\u003ereceipt date, vendor, totals, tax, category, description\u003c\/strong\u003e, and any \u003cstrong\u003eT-number\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf Gemini indicates it’s \u003cstrong\u003enot a receipt\u003c\/strong\u003e, it asks the user (via LINE) to retake and resend the photo.\u003c\/li\u003e\n  \u003cli\u003eIf a \u003cstrong\u003eT-number\u003c\/strong\u003e is present, it calls the \u003cstrong\u003eNTA invoice validity endpoint\u003c\/strong\u003e using the extracted receipt date, then combines the validity result with the extracted expense data and the \u003cstrong\u003eGoogle Drive file link\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends the final record to Google Sheets\u003c\/strong\u003e and replies in LINE with the invoice validity status.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eTeams collecting receipt photos on mobile and auto-generating expense logs with invoice validity checks.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators automating back-office bookkeeping steps without manual spreadsheet entry.\u003c\/li\u003e\n  \u003cli\u003en8n users building a chat-based expense capture pipeline for Japanese invoices.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLINE Messaging API\u003c\/strong\u003e: webhook trigger, image download, and LINE reply using Channel Access Token.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e: receipt classification and structured field extraction (configurable endpoint\/model as needed).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNTA Web-API\u003c\/strong\u003e: T-number invoice validity verification.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Drive\u003c\/strong\u003e: image archive and Drive link storage.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e: expense record appending.\u003c\/li\u003e\n  \u003cli\u003eCore n8n logic uses nodes such as \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003emerge\u003c\/strong\u003e, and supporting workflow components.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46154042769587,"sku":"N8N-20073","price":57.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Sr1QZzbWr9hT3UoPs_fNk_3gMPsPqr.png?v=1790933003","url":"https:\/\/buyflowscripts.com\/products\/line-receipt-expense-capture-with-gemini-drive-sheets-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}