Line Chatbot with Google Sheets as Memory
detail.loadingPreview
A Line chatbot that uses Google Sheets to store and retrieve conversation history for AI interactions.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This workflow enables a Line chatbot to maintain conversational memory by leveraging Google Sheets. It captures user messages, retrieves past interactions from Google Sheets, sends them along with the current message to an AI agent for context-aware responses, and then updates the Google Sheet with the latest conversation history.
Key Features
- Integrates with Line messaging platform via webhook.
- Uses Google Sheets as a persistent memory for conversation history.
- Utilizes an AI Agent (potentially Gemini) for generating contextually relevant responses.
- Stores up to 4 archived conversation turns along with the current history.
- Sends replies back to the user via the Line API.
How To Use
- Set up Line Developer Account: Create a Line Official Account and obtain Channel Access Token.
- Set up Google Cloud Project: Enable Google Sheets API and authenticate your service account or OAuth2 credentials.
- Create a Google Sheet: Design a sheet with columns for 'UserID ', 'History', 'LastUpdated', and 'History_Archive_1' through 'History_Archive_4'.
- Configure n8n:
- Set up the Webhook node with your Line webhook URL and verify it.
- Configure the Google Sheets nodes ('Get History' and 'Save History') with your Google Sheets credentials and the correct Document ID and Sheet Name.
- Set up the AI Agent node with your desired AI model and system message.
- Adjust the Edit Fields nodes to correctly map incoming Line message data.
- Configure the Prepare Prompt node to correctly construct the prompt for the AI, including conversation history.
- Set the HTTP Request node with your Line messaging API endpoint and Channel Access Token for sending replies.
- Deploy and Test: Activate the workflow and send messages to your Line bot to test its memory functionality.
Apps Used
Workflow JSON
{
"id": "e111b74e-f9db-4e6c-bc37-f72c6311e507",
"name": "Line Chatbot with Google Sheets as Memory",
"nodes": 0,
"category": "AI & Chatbots",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: e111b74e-f9db...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Verification Info
Related Integrations
- Google Sheets + Schedule Trigger(394 workflows)
- Google Sheets + Split Out(277 workflows)
- Gmail + Schedule Trigger(270 workflows)
- Google Sheets + Slack(268 workflows)
- Gmail + Google Sheets(245 workflows)
- Google Drive + Google Sheets(203 workflows)
- Form Trigger + Google Sheets(163 workflows)
- Google Drive + Google Drive Trigger(135 workflows)
- Google Drive + Split Out(134 workflows)
- Gmail + Split Out(132 workflows)
Related Workflows
Discover more workflows you might like
Youtube Discord Bot (Unverified)
A Discord bot that answers questions about YouTube videos using AI.
Telegram AI Assistant with Long Term Memory & Note Storage
An AI assistant for Telegram that leverages long-term memory and note-taking capabilities.
Slack AI Assistant with Webhook Integration
This workflow sets up a Slack AI assistant that responds to messages received via a webhook. It uses Google Gemini Chat Model for AI processing and a Window Buffer Memory node to maintain conversation history.
Chatbot Pizza Order Automation
Automates pizza orders via a chatbot interface, handling menu inquiries, order placement, and status checks.
Build a WhatsApp AI Concierge for Hotels with n8n
Automate hotel guest inquiries with an n8n WhatsApp chatbot. This workflow uses an AI node to process messages against a hotel encyclopedia, ensuring accurate and professional responses.
Automate Instagram Reel Analysis with Gemini and Apify
Unlock deeper insights into your Instagram Reels by automating analysis. This workflow leverages Apify to fetch reel data and Gemini AI to dissect key elements like background, pose, text, and context, enabling better content replication.