"Let the AI publish articles automatically" is easy to build and a bad idea to run. Our setup has Claude write drafts straight into Joomla, with images and metadata, and a person publishes every one of them. This post shows that setup. Joomla's permissions and workflows do the controlling, not the prompt.
The pipeline
- An editor gives Claude a brief: topic, audience, sources, internal links to use.
- Claude writes the article and calls Joomla through an MCP server (or a script) to save it as an unpublished draft, with category, meta description and, if needed, an image.
- Joomla puts the draft into a review stage. Only editors can move it on.
- An editor checks facts, links and tone in the normal article editor, then publishes.
The AI never holds publish rights. That single decision is what makes the rest safe to automate.
Step 1: an account that can't publish
Create a user group "AI writer" (child of Registered, not Author or Editor) and give it, in Articles → Options → Permissions and per category:
| Permission | AI writer |
|---|---|
| Create | Allowed, only in the categories it writes for |
| Edit Own | Allowed (so it can revise its own drafts) |
| Edit, Edit State, Delete | Denied |
| Execute transition (with Workflows) | only "Submit for review" |
| Media: Access Administration Interface, Create | Allowed, if it uploads images |
Create one user in that group, allow the group to have API tokens (Plugins → User – Joomla API Token → Allowed User Groups), and generate the token on the user's Joomla API Token tab. Joomla then enforces "drafts only" on every request, whatever the model decides to send. A "state": 1 from a user without Edit State is ignored, so the article stays unpublished.
Step 2 (optional): a review stage with Workflows
For teams, turn on Workflows (Articles → Options → Integration → Enable Workflow) and create a workflow such as:
Draft ──(Submit for review: AI writer, Authors)──▶ Review ──(Publish: Editors)──▶ Published
└──(Send back: Editors)──▶ Draft
Transitions have their own permissions, so the AI's group gets exactly one: Submit for review. Since Joomla 6.1 the workflow screen draws this as a diagram, which makes it easy to check with the team.
Step 3: the writing call
With an MCP server (we build one in How to build a Joomla MCP server), Claude calls a create_draft tool. Without one, a script does the same request:
# terminal – what the tool sends
curl -s -X POST "https://example.com/api/index.php/v1/content/articles" \
-H "Authorization: Bearer $AI_WRITER_TOKEN" -H "Content-Type: application/json" -H "Accept: application/vnd.api+json" \
-d @- <<'JSON'
{
"title": "How we test VirtueMart orders after an upgrade",
"catid": 24,
"language": "*",
"state": 0,
"metadesc": "The test orders we run after every VirtueMart or Joomla upgrade, step by step.",
"articletext": "<p>Intro paragraph…</p><hr id=\"system-readmore\"><h2>…</h2><p>…</p>",
"note": "AI draft – needs fact check"
}
JSON
Two fields make the editors' job easier: note shows in the article list in the back end (we use it for "AI draft, sources: …"), and metadesc gets written while the model still has the whole article in context.
Step 4: images
Images go through the Media API, base64-encoded, into a folder you choose. The request passes the same upload checks as the Media Manager: allowed extensions and MIME type.
# terminal
curl -s -X POST "https://example.com/api/index.php/v1/media/files" \
-H "Authorization: Bearer $AI_WRITER_TOKEN" -H "Content-Type: application/json" \
-d "{\"path\": \"local-images:/blog/drafts/vm-test-orders.jpg\", \"content\": \"$(base64 < cover.jpg | tr -d '\n')\"}"
Reference it in the article's images field (image_intro, image_fulltext) or in the HTML. Keep AI-supplied images in a drafts folder, so you can see at a glance what still needs a human look.
Step 5: the review
This is where the time goes, and where it should. Our checklist for an AI draft:
- Every technical claim: version numbers, option names, menu paths, code. Models invent plausible option names. We check them against a real Joomla install.
- Every link resolves, and internal links point where the brief said.
- Code runs. Copy each block into a test site, or don't publish it.
- Voice: our experience, not generic advice. If the draft could appear on any site, it isn't finished.
- Title ≤ 60 characters, description ≤ 160, alias as intended.
We learned the first point the hard way. An older post on this blog told readers to install an npm package that doesn't exist. The model had made up a plausible name, and nobody checked. It's fixed, and it's why the review step is not optional.
What we automate, and what we don't
| Good fit | Keep human |
|---|---|
| First drafts from a detailed brief and sources | deciding what to publish |
| Meta descriptions for existing articles (see auto-generating meta descriptions) | facts, numbers, code |
| Translations as drafts for a native speaker to review | anything legal, medical or financial |
| Finding articles with missing alt text, descriptions or links | the final publish click |