AI Agents

RAG & app with WordPress content

53 nodes 218 123 Automatic trigger
Download

Workflow Description

An advanced template that integrates WordPress content processing with RAG (Retrieval-Augmented Generation) technology to build an intelligent agent capable of answering user questions based on your site's content. It uses OpenAI models and vector storage to deliver precise, context-aware results.

How it works

  1. 1.Extract WordPress content and segment it into processable paragraphs
  2. 2.Convert text to numerical vectors using OpenAI embedding models
  3. 3.Store vectors in Supabase database for fast retrieval
  4. 4.Process user questions through an interactive chat interface
  5. 5.Retrieve relevant content from the database and generate intelligent responses
  6. 6.Maintain conversation history in PostgreSQL to enhance future interactions

Use cases

  • Automate customer support with a knowledge engine that understands your site content
  • Build an intelligent assistant that provides accurate answers grounded in your company resources

Requirements

  • Valid OpenAI API key with sufficient permissions
  • Secure connection to PostgreSQL database and active Supabase account
  • Access to WordPress site with content ready for processing

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 218
Downloads 123

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