Latenode

Sync LINE chat history to Google Sheets and get AI-powered responses

This AI-powered LINE chatbot integration enables businesses and support teams to provide intelligent, context-aware customer interactions. By leveraging Google Sheets to store conversation history and Gemini AI for generating personalized responses, the chatbot can maintain contextual awareness and deliver tailored replies.

The workflow is triggered by incoming messages from LINE users, retrieves relevant chat history, generates an AI-powered response, and updates the conversation log in Google Sheets. This automation aims to enhance customer experience through smart, memory-enabled chatbots, making it a valuable tool for companies looking to streamline support and foster stronger client relationships.

Updated Apr 6, 2026Est. run: 26sEst. cost: $0.0703
How Latenode estimates time and cost

Latenode bills workflow runs in credits: 1 credit = 30 seconds of processing. Minimum charge per run depends on your plan. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how credits work →
AI agents & chatbots

Workflow preview

What this template does

  • Stores chat history in Google Sheets for easy access and review.
  • Generates personalized responses using Gemini AI based on conversation context.
  • Retrieves relevant chat history to maintain awareness and deliver tailored replies.
  • Automates the workflow for handling incoming messages from LINE users.
  • Updates the conversation log in Google Sheets with each interaction.

How it works

1
Trigger

Receive LINE Message

The chatbot integration is triggered by incoming messages from LINE users. It listens for new messages and extracts the message text, reply token, and user ID.

2
Action

Retrieve Chat History

The integration then retrieves the previous conversation history with the user from the connected Google Sheets spreadsheet. This allows the chatbot to maintain context and respond in a personalized manner.

3
Logic

Generate AI Response

The chatbot combines the current message and chat history into a conversation prompt, which is then sent to the Gemini AI model. The AI generates a personalized response based on the context of the conversation.

4
Action

Update Chat History

The new message from the user and the generated AI response are appended to the user's conversation log in the Google Sheets spreadsheet, updating the chat history.

5
Action

Send Response to LINE

Finally, the AI-generated response is returned to the LINE platform, completing the chatbot interaction and delivering the tailored reply to the user.

Setup guide

1

Add LINE Credential in Latenode

1. Go to the Latenode Credentials panel. 2. Add a new credential for the LINE integration. 3. Provide your LINE Channel Secret and Channel Access Token.

2

Configure Google Sheets in Latenode

1. Go to the Latenode Credentials panel. 2. Add a new credential for the Google Sheets integration. 3. Authorize Latenode to access your Google account and select the Google Sheets document and worksheet you want to use.

3

Set up Gemini AI in Latenode

1. Go to the Latenode Credentials panel. 2. Add a new credential for the Gemini AI integration. 3. Provide your Gemini AI API key and select the language model you want to use.

4

Configure LINE Webhook Trigger

1. In the Latenode visual builder, add a Webhook node. 2. Configure the Webhook node to listen for incoming messages from your LINE Official Account.

5

Map Data Fields in Latenode

1. In the Latenode visual builder, connect the Webhook node to an Edit Fields node. 2. Map the relevant data fields from the incoming LINE message, such as message text, reply token, and user ID.

Requirements

Google Sheets API access to create, update, and retrieve conversation history
Gemini AI API key to leverage the AI model for generating personalized responses
LINE Messaging API access to receive and respond to messages from LINE users
Latenode workspace setup with the required JavaScript, Google Sheets, and Gemini AI nodes to implement the chatbot workflow

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.

More templates

You might also like

Browse all templates →
AI agents & chatbots

Automate Slack messaging with OpenAI GPT-3 completions

This automation allows users to automatically generate and send Slack messages based on specific prompts or triggers, leveraging the power of OpenAI's GPT-3 API. The automation is designed for AI, agents, and chatbot enthusiasts who want to create dynamic and personalized Slack communications without manual intervention. The automation connects to the Slack API and OpenAI's GPT-3 API to generate and send messages in response to defined triggers, such as specific keywords or phrases. This can be useful for automating routine updates, responding to customer inquiries, or generating creative content for Slack channels.

26s$0.0703
AI agents & chatbots

Transcribe Google Drive audio to text and send via email

This automation template helps users transcribe audio files stored in their Google Drive using the OpenAI Whisper AI model, and then automatically deliver the transcribed text via email. It provides a convenient way to convert audio recordings into text-based content that can be easily shared and referenced. The workflow is manually triggered, requiring the user to specify the Google Drive folder containing the audio files. The template then retrieves the files, transcribes them using the OpenAI Whisper API, and constructs an email message with the transcribed text, which is then sent to the designated recipient.

8s$0.0005
AI agents & chatbots

Automate Google Ads copywriting across multiple campaigns

This automation solution allows users to generate Google Ads headlines and descriptions directly within Google Sheets, using the OpenAI API to automate the ad copywriting process across multiple campaigns. The tool streamlines ad creation by leveraging AI-powered text generation, enabling marketers to efficiently produce high-performing ad copy at scale. By integrating with Google Sheets and the OpenAI API, this solution simplifies the ad creation workflow, saving time and improving campaign performance.

26s$0.0703