Automation library · Data collection

WordPress - AI chatbot to enhance user experience

Started by someone opening a chat with it, and works across Postgres, Supabase, Supabase vectors and WordPress. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 45 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

45 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
1Loop or waits
4Services it connects to

The flow

Starts it 4Model 13Logic 17Service 11

The steps in the order they run, from what starts it.

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2Embeddings OpenAIEmbeddings Open AiModel
  3. 3Token SplitterText Splitter Token SplitterModel
  4. 4Embeddings OpenAI1Embeddings Open AiModel
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6Postgres Chat MemoryMemory Postgres ChatModel
  7. 7Embeddings OpenAI2Embeddings Open AiModel
  8. 8Token Splitter1Text Splitter Token SplitterModel
  9. 9Every 30 secondsSchedule triggerStarts it
  10. 10Postgres - Create documents tablePostgresService
  11. 11When chat message receivedChat triggerStarts it
  12. 12Wordpress - Get all postsWordpressService
  13. 13Wordpress - Get all pagesWordpressService
  14. 14Supabase Vector StoreVector Store SupabaseModel
  15. 15Default Data LoaderDocument Default Data LoaderModel
  16. 16Supabase - Retrieve documents from chatinputVector Store SupabaseModel
  17. 17AI AgentAgentModel
  18. 18Store documents on SupabaseVector Store SupabaseModel
  19. 19Default Data Loader1Document Default Data LoaderModel
  20. 20PostgresPostgresService
  21. 21Postgres - Create workflow execution history tablePostgresService
  22. 22Merge Wordpress Posts and PagesMergeLogic
  23. 23AggregateAggregateLogic
  24. 24Aggregate documentsAggregateLogic
  25. 25Respond to WebhookRespond To WebhookStarts it
  26. 26Aggregate1AggregateLogic
  27. 27Wordpress - Get posts modified after last workflow executionHttp RequestService
  28. 28Wordpress - Get posts modified after last workflow execution1Http RequestService
  29. 29Set fields1SetLogic
  30. 30Supabase - Store workflow executionSupabaseService
  31. 31Set fieldsSetLogic
  32. 32Store workflow execution id and timestamptzSupabaseService
  33. 33Merge retrieved WordPress posts and pagesMergeLogic
  34. 34Filter - Only published & unprotected contentFilterLogic
  35. 35Set fields2SetLogic
  36. 36HTML To MarkdownMarkdownLogic
  37. 37Filter - Only published and unprotected contentFilterLogic
  38. 38Loop Over ItemsSplit In BatchesLogic
  39. 39Markdown1MarkdownLogic
  40. 40Postgres - Filter on existing documentsPostgresService
  41. 41SwitchSwitchLogic
  42. 42Supabase - Delete row if documents existsSupabaseService
  43. 43Set fields4SetLogic
  44. 44Aggregate2AggregateLogic
  45. 45Set fields3SetLogic

How it's built

Starts on
Someone opening a chat with it
Steps
45, with 1 branch, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Postgres, Supabase, Supabase vectors, WordPress
Model
OpenAI
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, plus your own Postgres, Supabase, Supabase vectors and WordPress accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 45 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 45 steps before you point it at anything that matters.