{"product_id":"line-ai-chatbot-reply-with-gemini-log-to-google-sheets-n8n","title":"LINE AI Chatbot Reply with Gemini + Log to Google Sheets (n8n)","description":"\u003ch3\u003eTurn LINE Messages Into an AI Chat Assistant (Gemini) + Log Everything to Google Sheets\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow connects your \u003cstrong\u003eLINE Official Account\u003c\/strong\u003e to \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e so incoming customer messages automatically receive short, helpful AI replies—and every conversation is saved to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e for easy tracking.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives LINE webhook events\u003c\/strong\u003e via a POST webhook endpoint for the LINE Messaging API.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts required fields\u003c\/strong\u003e from the LINE event payload, including the \u003cem\u003ereply token\u003c\/em\u003e, \u003cem\u003euser ID\u003c\/em\u003e, and \u003cem\u003emessage text\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSkips non-text messages\u003c\/strong\u003e by checking whether the event contains a text message before processing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApplies a brand and support persona\u003c\/strong\u003e (predefined text you can update) to guide Gemini’s reply style and language.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates an AI response with Gemini\u003c\/strong\u003e using the customer message plus persona instructions, producing a short, helpful answer in the customer’s language.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the reply back to LINE\u003c\/strong\u003e using the LINE Messaging API and the reply token.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogs the exchange to Google Sheets\u003c\/strong\u003e by appending conversation rows for ongoing visibility and reporting.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomate first-line support for an \u003cstrong\u003ee-commerce\u003c\/strong\u003e LINE account (order questions, product FAQs) while keeping replies consistent with your persona.\u003c\/li\u003e\n  \u003cli\u003eReduce manual workload for \u003cstrong\u003eSaaS operators\u003c\/strong\u003e handling common onboarding and troubleshooting questions via LINE.\u003c\/li\u003e\n  \u003cli\u003eMaintain an audit trail of AI interactions by storing user messages and AI replies in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e.\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\/workflow components:\u003c\/strong\u003e \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003ehttp request\u003c\/code\u003e (plus supporting notes\/sticky note).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLINE integration:\u003c\/strong\u003e uses HTTP Header Auth for the LINE Messaging API (Authorization: Bearer \u0026lt;token\u0026gt;) and replies using the LINE \u003cem\u003ereply token\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI integration:\u003c\/strong\u003e \u003cstrong\u003eGoogle Gemini (PaLM)\u003c\/strong\u003e chat model credentials.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogging:\u003c\/strong\u003e Google Sheets OAuth credentials; appends rows to a target spreadsheet (e.g., a sheet named “LINE Log”).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003ePerfect for:\u003c\/strong\u003e n8n users, automation engineers, and teams that want a practical LINE AI chatbot workflow with Gemini responses and Google Sheets conversation logging.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45812015268019,"sku":"N8N-17952","price":40.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/6gFoVbXHjC2dubKO93OnS_zqlfHWhn.png?v=1786353270","url":"https:\/\/buyflowscripts.com\/products\/line-ai-chatbot-reply-with-gemini-log-to-google-sheets-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}