๐ง Build a Placetel RAG voice assistant with Google Drive, Supabase and Groq
โก 23 views ยท ๐ง Miscellaneous
Description
Quick Overview
This workflow indexes text files from Google Drive into a Supabase vector store using OpenAI embeddings, then answers Placetel webhook questions with a Groq-hosted Llama model using retrieval-augmented generation.
How it works
- Runs a daily schedule at 02:00 or starts manually to reindex documents.
- Lists files in a specified Google Drive folder and iterates through each file.
- Downloads each file, loads its text content, generates embeddings with OpenAI, and stores the resulting chunks in a Supabase vector table.
- Receives a POST request from Placetel with a question in
body.chatInput. - Embeds the question with OpenAI, retrieves the top 3 matching chunks from the Supabase vector store, and composes an answer with Groq (Llama 3.1 8B).
- Returns the generated answer to the webhook caller for use in voice output.
Setup
- Add Google Drive OAuth2 credentials and replace
DEINE_ORDNER_IDin the Drive query with the folder ID you want to index. - Set up Supabase (project, database, and
documentstable) and add Supabase credentials, ensuring thematch_documentsquery/function is available. - Add an OpenAI API key for both embedding steps and keep the same embedding model/settings for indexing and querying.
- Add a Groq API key and confirm the selected chat model (e.g.,
llama-3.1-8b-instant) is available in your Groq account. - Copy the Placetel webhook URL (
/rag-knowledge-webhook) and configure the calling system to sendPOST { "chatInput": "..." }.
๐ Nodes Used
HTTP Request, Webhook, Google Drive, Schedule Trigger, Question and Answer Chain, Embeddings OpenAI
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File