You are helping me build the following AI agent workflow. ## Goal Google Drive to Supabase RAG Sync: Monitors a Google Drive folder for new or modified files, chunks the text, generates OpenAI embeddings. ## Specification - What it does: You get instant access to your Google Drive documents by having them automatically indexed as searchable knowledge. The system pulls new or updated files from your folder, breaks them into manageable pieces, creates OpenAI embeddings, and saves the results in Supabase for fast retrieval. - Trigger: Triggered by an event (Event ยท on new or modified file in Google Drive) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Google Drive: Trigger and read document files - OpenAI: Generate text embeddings for vector search - Supabase: Store and retrieve contextualized vector data - n8n: Orchestrate the workflow automation pipeline ## Known pitfalls, handle each one explicitly in your implementation 1. Large binary files like PDFs may fail silent extraction if you do not explicitly configure a PDF parser tool before the text split step. 2. Supabase vector search performance degrades without an index, so create a hnsw or ivfflat index on the embedding column after initial load. 3. Embedding costs can spiral with unbounded file sizes, add a size filter to skip files larger than 10MB before processing. ## Reference implementation https://n8n.io/workflows/8200 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/google-drive-to-supabase-rag-sync/ via usecasesforagents.com