Answer voice queries from a webhook over Google Drive docs using GPT-4o-mini and Supabase

Go to Workflow
0 views
Built by Placetel Placetel
Created on June 05, 2026

Description

Quick overview
Placetel AI – RAG Voice Assistant with Google Drive & Supabase

How it works
Runs on a daily schedule at 02:00 or via manual start to reindex documents.
Lists files from a specified Google Drive folder and iterates through each file.
Downloads each Google Drive file, loads its text content, creates embeddings with OpenAI, and stores the resulting chunks in a Supabase vector table.
Receives a question via a POST webhook with a JSON body containing chatInput.
Generates an answer with GPT-4o-mini by semantically retrieving relevant passages from the Supabase vector store using the same OpenAI embeddings model.
Returns the generated, source-cited response to the webhook caller for voice output.

Setup
Add Google Drive OAuth2 credentials and replace DEINE_ORDNER_ID in the Drive query with the folder you want to index.
Add an OpenAI API credential and ensure the same embeddings model/settings are used for both indexing and querying.
Create/configure a Supabase project with a documents table and the match_documents RPC/query used for vector search, then add your Supabase credentials.
Copy the webhook URL from the webhook trigger and configure your calling system to POST { "chatInput": "..." } to it.

Nodes Used (8)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Google Drive
n8n-nodes-base.googleDrive
HTTP Request
n8n-nodes-base.httpRequest
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase