{"product_id":"line-food-photo-nutrition-analysis-with-gemini-to-google-sheets","title":"LINE Food Photo Nutrition Analysis with Gemini to Google Sheets","description":"\u003ch3\u003eTurn LINE food photos into nutrition logs (automatically)\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens to \u003cstrong\u003eLINE Messaging API\u003c\/strong\u003e webhooks, uses \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e to analyze uploaded food images, saves the photo to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, records nutrition estimates in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, and replies to the user in LINE with a clear nutrition summary.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives LINE messages\u003c\/strong\u003e via a webhook (POST) whenever a user sends something through the LINE Messaging API.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates the message type\u003c\/strong\u003e and checks whether the incoming message is an \u003cstrong\u003eimage\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads the image binary\u003c\/strong\u003e from the LINE data API using the LINE channel access token.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAnalyzes the photo with Gemini\u003c\/strong\u003e to determine if it contains food, estimate the meal name, and generate nutrition values.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses Gemini’s JSON response\u003c\/strong\u003e and keeps the original image binary for later steps.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIf it’s food:\u003c\/strong\u003e uploads the image to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, appends the nutrition record to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, and sends a nutrition\/advice reply back in \u003cstrong\u003eLINE\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIf it’s not food:\u003c\/strong\u003e replies in LINE asking the user to send a clearer food photo.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eBuilding a \u003cstrong\u003ephoto-to-nutrition\u003c\/strong\u003e bot for dietary tracking using LINE and n8n.\u003c\/li\u003e\n  \u003cli\u003eLogging meals from user-submitted photos into \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e for quick reporting.\u003c\/li\u003e\n  \u003cli\u003eCreating an operator-friendly workflow that stores evidence photos in \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e alongside nutrition estimates.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCore nodes\/workflow logic: \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eswitch\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eHTTP Request\u003c\/strong\u003e, \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eGoogle Gemini (PaLM) API credentials\u003c\/strong\u003e in n8n to perform nutrition analysis from the food image.\u003c\/li\u003e\n  \u003cli\u003eRequires LINE webhook setup and a secure \u003cstrong\u003eLINE channel access token\u003c\/strong\u003e for Authorization headers.\u003c\/li\u003e\n  \u003cli\u003eNeeds \u003cstrong\u003eGoogle Drive OAuth2\u003c\/strong\u003e to upload photos and \u003cstrong\u003eGoogle Sheets OAuth2\u003c\/strong\u003e to append nutrition results.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45865759473843,"sku":"N8N-18378","price":19.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/ZJB9a9BzG6Nc9aHPYjiu_nMxTwaD2.png?v=1787044100","url":"https:\/\/buyflowscripts.com\/products\/line-food-photo-nutrition-analysis-with-gemini-to-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}