Block 1 - Set File ID
- Type / Role
- n8n-nodes-base.set - set
- Config choices
- Version 3.4
This workflow is provided as-is. Please review and test before using in production.
This n8n workflow ensures data freshness in the RAG system by handling modifications to existing files. It complements the "Document Ingestion" workflow by triggering whenever a file in the monitor...
n8n-nodes-base.set, n8n-nodes-base.supabase, n8n-nodes-base.googledrive, n8n-nodes-base.if, n8n-nodes-base.aggregate, n8n-nodes-base.summarize, n8n-nodes-base.extractfromfile, n8n-nodes-base.httprequest
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by edisantosa.
Original n8n.io sourceThis n8n workflow ensures data freshness in the RAG system by handling modifications to existing files. It complements the "Document Ingestion" workflow by triggering whenever a file in the monitored Google Drive folder is updated.
This "delete-then-re-insert" process ensures the RAG agent always has access to the most current version of your documents.
Key Features & Workflow:
Update Trigger: The workflow activates using the File Updated trigger for the same Google Drive folder ("DOCUMENTS").
Duplicate Run Prevention: An If node cleverly filters out immediate "update" events that are triggered by the "Upload Doc" workflow's Word-to-Google-Doc conversion, preventing unecessary duplicate runs.
Delete Old Entries: Once a genuine update is detected, the workflow's first action is to find and delete all existing vector chunks associated with that file_id from the Supabase "documents" table.
Smart Versioning: It then retrieves the old version number from the deleted metadata and uses an OpenAI node (Set Version) to intelligently increment it (e.g., "v1" becomes "v2").
Re-Ingestion Pipeline: The updated file is then processed through the exact same logic as the "Upload Doc" workflow:
It is routed by a Switch node based on its MIME type (PDF, Google Doc, Excel, etc.).
Text is extracted, chunked, and embedded.
The Enhanced Default Data Loader enriches these new chunks with metadata, including the new, incremented version number.
Insert New Entries: Finally, the newly processed and versioned chunks are inserted back into the Supabase Vector Store.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Keep RAG system updated with Google Drive file changes to Supabase vector DB |
|---|---|
| Complexity | advanced |
| Nodes | 22 |
| Categories | Document Extraction, AI RAG |
| Author | edisantosa |
| Published | 20 Oct 2025 |
Use the JSON export at /data/workflows/9934/9934.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
This n8n workflow ensures data freshness in the RAG system by handling modifications to existing files. It complements the "Document Ingestion" workflow by triggering whenever a file in the monitor...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.