AI Automation for WordPress

Automation is where an LLM stops being a chat and starts doing work. An event comes in, a model decides what it means, and tools act on the site. The model never touches the database; it only calls the tools you give it.

What it is

An AI workflow has four parts:

  • Trigger: something happened: a form submission, a comment, a ticket, a schedule.
  • Agent: an LLM with instructions that reads the input and decides what to do.
  • Memory: recent context, so the agent does not treat every message as the first one.
  • Tools: actions the agent may call: create a draft, raise a notification, write a log.

How it works with WordPress

There are three places the workflow can live.

Diagram

3. Agent

2. Inside WordPress

1. External workflow

REST

MCP

n8n, Make, ZapierWP-Cron or a queueCore AI ClientClaude, Cursor, CI botWordPressREST API · Abilities API
  1. External workflow. A tool like n8n receives the event, runs the agent and calls WordPress through the REST API. Fast to change, visible as a diagram, lives outside the site.
  2. Inside WordPress. A plugin runs the job in the background with WP-Cron or a queue and asks the model through the core AI Client. Everything stays in one codebase.
  3. Agent. An external agent reaches the site through MCP and acts only through abilities declared with the Abilities API.

The rule is the same everywhere: the model decides, WordPress code acts and checks permissions.

The n8n model: support triage agent

Our n8n template “4WP AI Support & Content Triage Agent” shows the full shape.

Diagram

tool

tool

tool

Webhookform, comment, ticketAI AgentChat modelSession memory10 messages per siteCreate FAQ draft4WP FAQCreate notification4WP NotificationsLogGoogle SheetsRespond to caller

How the agent decides:

Diagram

recurring question

error, complaint, anomaly

noise

Incoming messageWhat is it?FAQ draft for reviewNotification to a humanNo actionLog every message

Instructions that matter:

  • The agent works through the REST API only: no shell, no database, only the tools it was given.
  • FAQ entries are always created as drafts for human review, never published.
  • Every message is logged once, whatever the decision.

The WordPress side:

ToolEndpointWhat it needs
FAQ draftPOST /wp-json/wp/v2/faq with status: draftThe faq post type is exposed to REST by 4WP FAQ
NotificationPOST /wp-json/forwp/v1/notificationstitle, type, recipients; a user allowed to send notifications

What we learned building it: an agent template is only as good as its endpoints. The first version of our template used illustrative routes and fields; we corrected them against the plugins’ code. Check routes and permissions against the installed plugins before you connect a workflow.

Challenges

ChallengeWhat to do
The agent does more than intendedGive it the minimum set of tools; nothing else exists for it
CredentialsA dedicated user with minimal capabilities; application passwords or header auth
Wrong decisionsDrafts and notifications, not direct publishing; a human approves
TraceabilityLog every input and every action
LoopsA tool must not trigger the same workflow again
Changing pluginsEndpoints change with versions; prefer abilities as a stable contract
CostFilter noise before the model when a rule is enough

Opportunities

  • Turn incoming messages into FAQ, so support answers once and the site answers next time.
  • Route urgent signals to people instead of inboxes.
  • Keep a log that shows what visitors actually ask.
  • Reuse the same plugin actions for n8n, cron jobs and agents.

Where it is used

AreaExample
SupportTriage questions, draft answers
ContentIntake from forms, drafts for editors
FAQBuild the knowledge base from real questions
OperationsAlerts on errors and anomalies
ReportingLogs and summaries of activity

What a specialist should be able to do

  • Decide where the workflow lives: outside, inside WordPress or as an agent.
  • Expose site actions safely: REST routes or abilities with permission checks.
  • Design agent instructions and limit its tools.
  • Keep humans in the loop for anything public.

FAQ

n8n or a plugin?
An external workflow is faster to change and easy to see. A plugin keeps logic and data inside WordPress. Both can call the same actions.

Does the agent get database access?
No. It calls endpoints, and WordPress checks permissions on every call.

Can it publish content?
It can if you allow it. In our template it creates drafts only.

Which model does it need?
A chat model that supports tool calling. The template uses an OpenAI chat model; swap it for any compatible one.

What if the plugin changes?
Endpoints can change between versions. Abilities give agents a declared contract instead of raw routes.

Related