AI Agents

RAG & app with WordPress content

53 nodes 264 175 Automatic trigger
Download

Workflow Description

An advanced template integrating Retrieval-Augmented Generation (RAG) with WordPress content to build an intelligent agent that extracts information from a vector database and answers user queries based on your site content with precision and speed.

How it works

  1. 1.Load WordPress content and split it into processable text segments
  2. 2.Convert segments into embedding vectors via OpenAI and store them in the database
  3. 3.Receive user queries through a chat interface and route them to an intelligent agent that searches vectors
  4. 4.Retrieve relevant search results from Supabase or Postgres
  5. 5.Generate a contextual response from the agent based on retrieved content
  6. 6.Send the reply to the user via webhook or web interface

Use cases

  • Build a smart customer support system that automatically answers frequently asked questions from WordPress knowledge bases
  • Create a virtual website assistant that understands your blog content and provides relevant answers instantly
  • Develop an intelligent search engine that returns contextually relevant results instead of traditional keyword-based search

Requirements

  • Active OpenAI account with sufficient permissions to generate embeddings and intelligent responses
  • WordPress integration with API keys to connect and retrieve content
  • Postgres or Supabase database configured to store vectors and associated metadata
  • Enabled chat trigger to receive and process user messages

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

OpenAI Document Default Data Loader Text Splitter Postgres WordPress Supabase Split In Batches Vector Store Chat Trigger AI Agent

Details

Trigger Automatic trigger
Nodes 53
Apps 10
Views 264
Downloads 175

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (53)

/

When clicking ‘Test workflow’

Manual Trigger

#1

Embeddings OpenAI

OpenAI

#2

Default Data Loader

Document Default Data Loader

#3

Token Splitter

Text Splitter Token Splitter

#4

Embeddings OpenAI1

OpenAI

#5

OpenAI Chat Model

OpenAI

#6

Postgres Chat Memory

Memory Postgres Chat

#7

Respond to Webhook

Webhook

#8

Set fields

Set

#9

Embeddings OpenAI2

OpenAI

#10

Default Data Loader1

Document Default Data Loader

#11

Token Splitter1

Text Splitter Token Splitter

#12

Markdown1

Markdown

#13

Postgres

Postgres

#14

Aggregate

Aggregate

#15

Aggregate1

Aggregate

#16

Aggregate2

Aggregate

#17

Sticky Note

Sticky Note

#18

Sticky Note1

Sticky Note

#19

Sticky Note2

Sticky Note

#20

Wordpress - Get all posts

Wordpress

#21

Wordpress - Get all pages

Wordpress

#22

Sticky Note3

Sticky Note

#23

Set fields1

Set

#24

Filter - Only published & unprotected content

Filter

#25

HTML To Markdown

Markdown

#26

Supabase - Store workflow execution

Supabase

#27

Sticky Note4

Sticky Note

#28

Every 30 seconds

Schedule Trigger

#29

Sticky Note5

Sticky Note

#30

Wordpress - Get posts modified after last workflow execution

HTTP Request

#31

Wordpress - Get posts modified after last workflow execution1

HTTP Request

#32

Set fields2

Set

#33

Filter - Only published and unprotected content

Filter

#34

Loop Over Items

Split In Batches

#35

Set fields3

Set

#36

Set fields4

Set

#37

Store documents on Supabase

Vector Store Supabase

#38

Store workflow execution id and timestamptz

Supabase

#39

Aggregate documents

Aggregate

#40

Sticky Note6

Sticky Note

#41

Sticky Note7

Sticky Note

#42

Postgres - Create documents table

Postgres

#43

Postgres - Create workflow execution history table

Postgres

#44

Merge Wordpress Posts and Pages

Merge

#45

Merge retrieved WordPress posts and pages

Merge

#46

Postgres - Filter on existing documents

Postgres

#47

Supabase - Delete row if documents exists

Supabase

#48

Switch

Switch

#49

When chat message received

Chat Trigger

#50

Supabase - Retrieve documents from chatinput

Vector Store Supabase

#51

AI Agent

Agent

#52

Supabase Vector Store

Vector Store Supabase

#53