Power Placetel voice answers from OneDrive docs with OpenAI and Groq

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

Description

Quick Overview
This workflow indexes text files from Microsoft OneDrive into a Supabase vector store using OpenAI embeddings, then answers incoming webhook questions with a Groq LLM using retrieval-augmented generation (RAG) and returns the response to the caller.

How it works
Runs on a daily schedule at 02:00 or starts manually to re-index documents.
Lists files in a specified OneDrive folder via the Microsoft Graph API and iterates through each file.
Downloads each OneDrive file, loads its text content, generates OpenAI embeddings, and stores the resulting chunks in a Supabase vector store table.
Receives a POST request on a webhook containing a question in body.chatInput.
Creates an embedding for the question, retrieves the top matching chunks from Supabase, and uses Groq (Llama 3.1) to generate a structured answer based on the retrieved context.
Returns the generated answer as the webhook response.

Setup
Create a Microsoft OneDrive OAuth2 credential and update the Microsoft Graph folder path in the OneDrive listing request URL.
Add an OpenAI API key for embeddings and ensure the same embeddings model is used for both indexing and querying.
Set up Supabase credentials and a documents table (with the configured match_documents query/function) for the Supabase vector store.
Add a Groq API key and confirm the Groq model selection and prompt content match your voice-assistant use case.
Copy the webhook URL and configure the calling system to send POST requests with a JSON body like { "chatInput": "..." }.

Nodes Used (9)

Code
n8n-nodes-base.code
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq
HTTP Request
n8n-nodes-base.httpRequest
Microsoft OneDrive
n8n-nodes-base.microsoftOneDrive
Question and Answer Chain
@n8n/n8n-nodes-langchain.chainRetrievalQa
Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase
Vector Store Retriever
@n8n/n8n-nodes-langchain.retrieverVectorStore