WordPress - AI chatbot to enhance user experience - with Supabase and OpenAI
Needs changesWhat this workflow does
This AI workflow has 45 nodes and runs on a schedule (every second) (plus 2 other triggers). Along the way it connects Embeddings OpenAI, OpenAI Chat Model, Postgres Chat Memory and Postgres and 3 more. It also calls mydomain.com over HTTP.
How it runs
Trigger: On a schedule (every second) (plus 2 other triggers).
- Postgres: run a query
- Wordpress: get many
- Wordpress: get many (page)
- Supabase - Retrieve documents from chatinput (Supabase Vector Store): searches the Supabase vector store, with embeddings: Embeddings OpenAI
- Wordpress - Get posts modified after last workflow execution (HTTP Request): calls mydomain.com
- Wordpress - Get posts modified after last workflow execution (HTTP Request): calls mydomain.com
- Merge: merges the data from its input branches
- Aggregate: combines items into one
- Merge: merges the data from its input branches
- Set fields (Edit Fields (Set)): sets 9 fields: publication_date, modification_date, content_type…
…plus 23 more steps. See the full node list below.
Services it uses
HTTP calls to: mydomain.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (22)
- Manual Trigger
n8n-nodes-base.manualTrigger - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Token Splitter
@n8n/n8n-nodes-langchain.textSplitterTokenSplitter - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Respond to Webhook
n8n-nodes-base.respondToWebhook - Edit Fields (Set)
n8n-nodes-base.set - Markdown
n8n-nodes-base.markdown - Postgres
n8n-nodes-base.postgres - Aggregate
n8n-nodes-base.aggregate - Wordpress
n8n-nodes-base.wordpress - Filter
n8n-nodes-base.filter - Supabase
n8n-nodes-base.supabase - Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Merge
n8n-nodes-base.merge - Switch
n8n-nodes-base.switch - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
This is the first version of a template for a RAG/GenAI App using WordPress content. As creating, sharing, and improving templates brings me joy 😄, feel free to reach out on LinkedIn if you have any ideas to enhance this template! How It Works This template…