See llms.txt for all machine-readable content.

Back to Templates

Reply to LINE customer chats with Google Gemini and log to Google Sheets

Created by

Created by: Oka Hironobu || okp29
Oka Hironobu

Last update

Last update 3 days ago

Categories

Share


Quick Overview

This workflow turns a LINE Official Account into an AI chat assistant by receiving customer messages via a webhook, generating a reply with Google Gemini, sending the response through the LINE Messaging API, and logging each conversation to Google Sheets.

How it works

  1. Receives incoming LINE Messaging API events through a POST webhook.
  2. Extracts the reply token, user ID, and message text from the LINE event payload.
  3. Skips processing when the incoming event does not contain a text message.
  4. Adds a predefined brand name and support persona to guide the reply style.
  5. Sends the customer message and persona instructions to Google Gemini to generate a short, helpful response in the customer’s language.
  6. Replies to the customer via the LINE Messaging API using the reply token and then appends the exchange to a Google Sheets log.

Setup

  1. In your LINE Official Account settings, enable webhooks and set the workflow’s webhook URL as the channel webhook endpoint.
  2. Add a LINE channel access token as an HTTP Header Auth credential (Authorization: Bearer <token>) for the LINE Messaging API request.
  3. Add Google Gemini (PaLM) API credentials for the Gemini chat model.
  4. Add Google Sheets OAuth credentials, select the target spreadsheet, and ensure a sheet (for example, “LINE Log”) exists for appending conversation rows.
  5. Update the brand name and persona text to match your business tone and response rules.