At a glance
- Trigger
- Schedule Trigger (Every 30 seconds)
- Nodes
- 45
- Apps
- OpenAI, Postgres, WordPress and Supabase
- AI nodes
- 14
- Credentials
- None
- Category
- RAG, documents and vector search
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Workflow 1: Initial Embedding
Use this workflow to create the initial embedding for your WordPress website content
Workflow 3: Use this workflow to enable chat functionality with your website content. The chat can be embedded into your website to enhance user experience
Run these two nodes if the "documents" table on Supabase and the "[redacted]" table do not exist
Use filters to create embeddings only for content that you want to include in your GenAI application
Retrieve documents from Supabase immediately after chat input to send metadata to OpenAI
Workflow 2: Upsert
Use this workflow to upsert embeddings for documents stored in the Supabase vector table
Set this node to match the frequency of publishing and updating on your website
Switch
- If the document exists and has been updated: delete rows and insert new embedding
- If it’s a new document: insert embedding
Nodes in this workflow
The 45 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- When clicking ‘Test workflow’ (Manual Trigger)
- Embeddings OpenAI (OpenAI Embeddings)
- Default Data Loader (Default Data Loader)
- Token Splitter (Token Splitter)
- Embeddings OpenAI1 (OpenAI Embeddings)
- OpenAI Chat Model (OpenAI Chat Model)
- Postgres Chat Memory (Postgres Chat Memory)
- Respond to Webhook (Respond to Webhook)
- Set fields (Edit Fields (Set))
- Embeddings OpenAI2 (OpenAI Embeddings)
- Default Data Loader1 (Default Data Loader)
- Token Splitter1 (Token Splitter)
- Markdown1 (Markdown)
- Postgres (Postgres)
- Aggregate (Aggregate)
- Aggregate1 (Aggregate)
- Aggregate2 (Aggregate)
- Wordpress - Get all posts (WordPress)
- Wordpress - Get all pages (WordPress)
- Set fields1 (Edit Fields (Set))
- Filter - Only published & unprotected content (Filter)
- HTML To Markdown (Markdown)
- Supabase - Store workflow execution (Supabase)
- Every 30 seconds (Schedule Trigger)
- Wordpress - Get posts modified after last workflow execution (HTTP Request)
- Wordpress - Get posts modified after last workflow execution1 (HTTP Request)
- Set fields2 (Edit Fields (Set))
- Filter - Only published and unprotected content (Filter)
- Loop Over Items (Loop Over Items)
- Set fields3 (Edit Fields (Set))
- Set fields4 (Edit Fields (Set))
- Store documents on Supabase (Supabase Vector Store)
- Store workflow execution id and timestamptz (Supabase)
- Aggregate documents (Aggregate)
- Postgres - Create documents table (Postgres)
- Postgres - Create workflow execution history table (Postgres)
- Merge Wordpress Posts and Pages (Merge)
- Merge retrieved WordPress posts and pages (Merge)
- Postgres - Filter on existing documents (Postgres)
- Supabase - Delete row if documents exists (Supabase)
- Switch (Switch)
- When chat message received (Chat Trigger)
- Supabase - Retrieve documents from chatinput (Supabase Vector Store)
- AI Agent (AI Agent)
- Supabase Vector Store (Supabase Vector Store)
Credentials you need
The workflow JSON lists no credentials. Nodes that call external services may still need credentials after you import it.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.