AI-Powered Knowledge Assistant using Google Sheets, OpenAI, and Supabase Vector Search

Nodes

24e3b914-15fa-444f-80e3-ca29bdacaf401841584d-f090-40d7-8a99-6d8ec8df82fdafaa1f23-4ffb-405e-b890-5057b3656ba4+6

Created by

AlAlex Huy

Last edited 39 days ago

Description An intelligent conversational AI system that provides contextual responses by combining chat history, vector database knowledge retrieval, and web search capabilities. How it Works (High-level steps)

Message Detection: Google Sheets trigger monitors for new user messages and filters out already-processed entries Context Preparation: Extracts user message, retrieves chat history, and formats conversation context with system prompt Knowledge Retrieval: AI agent searches vector database for relevant context using Supabase + OpenAI embeddings Response Generation: LangChain agent processes the request using:

OpenAI GPT-4 language model Vector store tool for knowledge base queries SerpAPI tool for web search when needed Buffer memory for conversation continuity

Response Storage: Updates Google Sheets with AI response and assigns unique timestamp ID

Setup Steps

Configure Google Sheets with columns: user_message, ai_respond, id Set up Supabase vector store with OpenAI embeddings Connect OpenAI API credentials (GPT-4 + embeddings) Configure SerpAPI for web search functionality Set up Google Sheets trigger and update permissions

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!