Reindex markdown RAG chunks with Supabase pgvector and webhooks
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs on a schedule (every day at 02:00) (plus 1 other trigger). Along the way it connects Postgres. It also calls kairesume.fit and jhccfsyytbkfmdvduvds.supabase.co over HTTP.
How it runs
Trigger: On a schedule (every day at 02:00) (plus 1 other trigger).
- Fetch Sources (FAQ + Blog) (HTTP Request): calls kairesume.fit
- Chunk and Batch (Code): runs custom JavaScript code
- Loop Batches (Loop Over Items (Split in Batches)): loops over the items in batches
- Delete Stale Chunks (Postgres): run a query
- Embed Batch (Supabase) (HTTP Request): calls jhccfsyytbkfmdvduvds.supabase.co (POST)
- Build Upsert SQL (Code): runs custom JavaScript code
- Upsert Chunks (Postgres): run a query
Services it uses
HTTP calls to: kairesume.fit, jhccfsyytbkfmdvduvds.supabase.co
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Postgres
n8n-nodes-base.postgres - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Webhook
n8n-nodes-base.webhook
From the author
Quick Overview This workflow reindexes Markdown documentation into a Supabase Postgres pgvector table by fetching source docs from an HTTP API, chunking and embedding them via a Supabase Edge Function, upserting the vectors, and deleting stale chunks on a…