RAG & app with WordPress content
Workflow Description
Advanced automation template that extracts WordPress content and transforms it into an intelligent retrieval-augmented generation system (RAG) powered by OpenAI. Enables organizations to build a smart agent capable of answering customer queries based on their internal content repository with precision and reliability.
How it works
- 1.Extract WordPress content and split it into manageable chunks for processing
- 2.Convert text chunks into numerical embeddings using OpenAI's embedding model
- 3.Store embeddings in Postgres and Supabase databases for fast retrieval and querying
- 4.Process incoming chat messages through the AI agent and route them to the appropriate handler
- 5.Search and retrieve the most relevant content from the vector store based on semantic similarity
- 6.Generate accurate answers using OpenAI's language model while maintaining context and conversation memory
Use cases
- Intelligent customer support system answering questions based on your company's knowledge base
- Advanced internal search engine that understands meaning beyond literal text matching
- Automated advisory platform delivering consistent answers backed by trusted content
- Employee onboarding tool helping new staff find answers to common questions quickly
Requirements
- Valid OpenAI API key for accessing language models and embeddings
- Configured and securely connected Postgres or Supabase database instance
- Active WordPress site with organized and extractable content
- Minimum content volume (hundreds of pages) to ensure result quality
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (53)
When clicking ‘Test workflow’
Manual Trigger
Embeddings OpenAI
OpenAI
Default Data Loader
Document Default Data Loader
Token Splitter
Text Splitter Token Splitter
Embeddings OpenAI1
OpenAI
OpenAI Chat Model
OpenAI
Postgres Chat Memory
Memory Postgres Chat
Respond to Webhook
Webhook
Set fields
Set
Embeddings OpenAI2
OpenAI
Default Data Loader1
Document Default Data Loader
Token Splitter1
Text Splitter Token Splitter
Markdown1
Markdown
Postgres
Postgres
Aggregate
Aggregate
Aggregate1
Aggregate
Aggregate2
Aggregate
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Wordpress - Get all posts
Wordpress
Wordpress - Get all pages
Wordpress
Sticky Note3
Sticky Note
Set fields1
Set
Filter - Only published & unprotected content
Filter
HTML To Markdown
Markdown
Supabase - Store workflow execution
Supabase
Sticky Note4
Sticky Note
Every 30 seconds
Schedule Trigger
Sticky Note5
Sticky Note
Wordpress - Get posts modified after last workflow execution
HTTP Request
Wordpress - Get posts modified after last workflow execution1
HTTP Request
Set fields2
Set
Filter - Only published and unprotected content
Filter
Loop Over Items
Split In Batches
Set fields3
Set
Set fields4
Set
Store documents on Supabase
Vector Store Supabase
Store workflow execution id and timestamptz
Supabase
Aggregate documents
Aggregate
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
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
Vector Store Supabase
AI Agent
Agent
Supabase Vector Store
Vector Store Supabase