{"product_id":"n8n-line-receipt-photo-to-google-sheets-with-openai","title":"n8n LINE Receipt Photo to Google Sheets with OpenAI","description":"\u003ch3\u003eTurn LINE receipt photos into a Google Sheets expense log—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches for receipt images sent via \u003cstrong\u003eLINE\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to extract structured expense data, and then \u003cstrong\u003eappends or updates\u003c\/strong\u003e the row in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e. It also responds back in LINE with a confirmation—or an error if something goes wrong.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a webhook\u003c\/strong\u003e from the \u003cstrong\u003eLINE Messaging API\u003c\/strong\u003e and checks whether the incoming event contains an \u003cstrong\u003eimage message\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf the message isn’t an image, it \u003cstrong\u003ereplies in LINE\u003c\/strong\u003e asking the user to send a \u003cstrong\u003ereceipt photo\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads the receipt image\u003c\/strong\u003e via the LINE content API and converts it to \u003cstrong\u003eBase64\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eSends the image to \u003cstrong\u003eOpenAI Chat Completions\u003c\/strong\u003e with a \u003cstrong\u003estrict JSON schema\u003c\/strong\u003e to extract: \u003cstrong\u003edate\u003c\/strong\u003e, \u003cstrong\u003estore\u003c\/strong\u003e, \u003cstrong\u003ecategory\u003c\/strong\u003e, \u003cstrong\u003eamount\u003c\/strong\u003e, \u003cstrong\u003ecurrency\u003c\/strong\u003e, and \u003cstrong\u003ememo\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates and sanitizes\u003c\/strong\u003e extracted fields (date and currency formats, allowed categories, non-negative amount, and formula-safe text).\u003c\/li\u003e\n  \u003cli\u003eUses the \u003cstrong\u003eLINE message ID\u003c\/strong\u003e as a \u003cstrong\u003e“Receipt ID”\u003c\/strong\u003e to prevent duplicates by \u003cstrong\u003eappending or updating\u003c\/strong\u003e the Google Sheets row accordingly.\u003c\/li\u003e\n  \u003cli\u003eReplies in LINE with the \u003cstrong\u003elogged details\u003c\/strong\u003e, or returns a \u003cstrong\u003eprocessing error\u003c\/strong\u003e if any step fails.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCapture business expenses instantly by sending a receipt to your LINE Official Account.\u003c\/li\u003e\n  \u003cli\u003eKeep a continuously updated expense log in Google Sheets without manual data entry.\u003c\/li\u003e\n  \u003cli\u003eUse the Receipt ID to safely reprocess messages without creating duplicate rows.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\/logic:\u003c\/strong\u003e webhook, if, set, code, sticky note, HTTP request\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e LINE Messaging API (webhook + content download + LINE replies), \u003cstrong\u003eOpenAI\u003c\/strong\u003e (Chat Completions with JSON schema), \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAuth:\u003c\/strong\u003e LINE channel access token via HTTP header \u003cem\u003eAuthorization: Bearer \u0026lt;token\u0026gt;\u003c\/em\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45741404848307,"sku":"N8N-17620","price":7.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/rjM0tueisEsF8Is8GARAM_56D4nISj.png?v=1785315716","url":"https:\/\/buyflowscripts.com\/products\/n8n-line-receipt-photo-to-google-sheets-with-openai","provider":"N8N Commerce","version":"1.0","type":"link"}