n8n

How to Automate WordPress AI Content Search?

Help visitors get quick answers from your site content. An AI chat reads your posts and pages and returns clear responses with links. Good for marketing teams that publish often and want better content discovery.

WordPress posts and pages are pulled in, cleaned to Markdown, split into small parts, and turned into embeddings using OpenAI. The data is stored in a Supabase vector table. A schedule checks for new or updated items, then upserts only what changed. A Switch node decides when to delete old vectors and insert new ones. During chat, the flow looks up the best matching content, adds titles and URLs as context, and uses an OpenAI chat model with memory saved in PostgreSQL to keep the conversation on track. Answers are returned through a webhook response.

Set your site URL, Supabase project details, and OpenAI key. Tables for documents and run history can be created with the provided nodes if they do not exist. Run the initial load once, then let the schedule keep things fresh. Expect faster content discovery, fewer support emails, and more time saved each week on manual updates. The chat trigger can be embedded on your site so people can ask questions in plain language.

What are the key features?

  • Pulls WordPress posts and pages and filters only published and unprotected content.
  • Converts HTML to Markdown so text is clean and easy to index.
  • Splits content into small chunks to improve search and answer quality.
  • Creates embeddings with OpenAI and stores them in a Supabase vector table.
  • Uses a schedule to detect modified items and upserts only what changed.
  • Deletes and reinserts vectors when a document is updated to keep results accurate.
  • Powers a chat that retrieves related content and uses an OpenAI chat model with memory in PostgreSQL.
  • Returns chat replies through a webhook for fast responses on your site.

What are the benefits?

  • Reduce manual knowledge base updates from hours to minutes
  • Automate most content refresh tasks with scheduled checks
  • Improve answer accuracy by using the latest site content
  • Handle large libraries of posts and pages without extra work
  • Connect WordPress, Supabase, OpenAI and PostgreSQL in one flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with WordPress, Supabase, OpenAI and PostgreSQL. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, open each WordPress node, choose Credential to connect with, click Create new credential, and follow the on screen steps. Use your site URL and an account or application password with access to posts and pages.
  4. For Supabase, open each Supabase node and create a new credential. Enter your project URL and the service role key from the Supabase dashboard. Name the credential clearly so you can reuse it.
  5. For PostgreSQL, open each Postgres node and create a new credential. Point it to your Supabase Postgres database host, database, user, and password. Enable SSL if your project requires it.
  6. For OpenAI, open each OpenAI node, create a new API Key credential, and paste your key from the OpenAI account API page. Save the credential with a clear name.
  7. Open the WordPress list nodes and confirm the base URL and query settings. Keep the filters that include only published and unprotected content.
  8. Run the create table nodes if your documents and run history tables do not exist. Check the execution to confirm the tables were created without errors.
  9. Start the initial load using the manual trigger. After it finishes, open your Supabase project and confirm that vectors and metadata were stored.
  10. Configure the schedule trigger to a sensible interval for your site, then enable the workflow. Edit a WordPress post and verify that an update is detected and the vector is refreshed.
  11. Open the chat trigger node and start a test conversation. Ask a question that matches a page. Confirm that the reply includes the right context and links. If results are noisy, adjust chunk size and overlap in the splitter nodes and test again.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

PostgreSQL

Sign up

Free: $0 (open-source PostgreSQL License; self-hosted)

Supabase

Sign up

Free: $0 / mo — unlimited API requests; 500 MB database; 5 GB bandwidth; 1 GB storage; 50,000 MAUs.

WordPress

Sign up

Free plan: $0 / mo (WordPress.com REST API supports creating posts)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.