Dr. Violet Howard builds a RAG workflow in n8n that watches a Google Drive folder, stores file embeddings in Supabase, and queries them with an AI agent. She confirms five items load into the vector store, then asks the agent for a shipping policy and gets the right answer.
Chapters
Here's how you build a simple RAG pipeline in N8N. So the first thing we're going to build is the pipeline that takes a new doc that we drop into a Google Drive folder and it puts it into a vector database. So super simple. We're going to start off here by grabbing a Google Drive node and we're going to grab a trigger that is on changes involving a specific folder. So after you connect your Google Drive account, you want to choose the folder that you're going to be looking in. And then what are we watching for? We're watching for a new file being created in this folder and I hit fetch test event, we should now see that that folder has arrived. Or sorry, not the folder, the file. So I'm going to grab another Google Drive node. We're going to do download file and I'm gonna change the file we're looking for to be by ID. And then all I have to do here is find the ID of the file that triggered this workflow. We've got what we want and now it's as simple as that. I'm just going to add a Supabase step. We're gonna add a Supabase vector store, and now I'm just gonna run this. and this is gonna put that policy and FAQ document into our Supabase. Cool. So it says 5 items should be there. So we should refresh this and see 5 items. Oh, they popped up right there. Real quick before we build that next pipeline, I'm just gonna build a really, really quick AI agent so we can validate that it is able to read this document. Okay, so set that up real quick. I'm just gonna ask it, what is our shipping policy? Shoot that off and we should get an answer from the vector database. I didn't even give the agent a prompt or anything. We just, hooked it up to a tool, and look how smart this guy is. So we've got our shipping policy: orders are processed within 1 to 2 business days, standard shipping takes 3 to 7 business days. And you can see right here that it is correct. If you want to watch the full video, then click on that play button right here, and I'll see you guys over there.