Give fast, context aware replies on LINE without extra staff. Incoming messages go to an AI that understands Thai, uses past chat history from Google Sheets, and sends a clean reply back to the user. Great for first line customer support and FAQ handling on a LINE Official Account.
Here is how it works. LINE sends a POST request to an n8n webhook. The flow extracts the user message, user ID, and reply token. It then looks up the user’s past chat history in Google Sheets. A prompt is built that includes the history and the new message with a friendly Thai assistant persona. Google Gemini creates the reply. The history is cleaned and split, then updated in Google Sheets with a timestamp. The reply is posted back to the LINE Messaging API using the reply token.
You will need a LINE channel access token, a Google Sheets file with the required columns, and a Google Gemini API key. Expect faster replies, fewer manual tasks, and consistent tone. Use this setup for 24x7 FAQs, simple pre sales questions, and routing to human agents when needed. Start small, then expand the sheet structure as volume grows.