---
title: "WordPress posts put in a category by AI from the title"
kind: "Kit"
category: "Writing"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/323f7934-9614-40d4-a75d-1f894e74ef35"
updated: "2026-11-13"
---

# WordPress posts put in a category by AI from the title

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that reads every published post of a WordPress site, asks an AI model to pick one category for each post from its title and saves it on the post.

WordPress posts put in a category by AI from the title is an n8n workflow in the Writing category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-13. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow sorts the posts of a WordPress site into categories. It fetches every published post, gives each title to an AI model together with your list of categories and saves the category the model picks. Five nodes run it, beside four sticky notes.

### Who it suits

Bloggers and content teams with many posts that have no clear categories. Skip it if posts already have categories you want to keep, since the update replaces them.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Publishing | Bloggers | Organize an archive | A blogger with 80 old posts gives each one a category in a single run. |
| Marketing | Content teams | Tidy a site before a redesign | A team sorts its blog into six topics before it builds new menus. |
| Agencies | Web agencies | Clean up a client’s blog | An agency categorizes a client’s posts after a site move. |
| Education | Course sites | Group articles by topic | A school sorts its articles into subjects for easier browsing. |

You need a little n8n, a WordPress credential and an OpenAI key: import a file, add two credentials and edit one prompt.

### Where to use it

Any n8n that can reach your WordPress site and OpenAI will run it. It starts by hand.

- n8n Cloud: import the file there and run it
- Your own n8n server: the same file and steps
- WordPress: where the posts are read and updated
- OpenAI: where each title is sorted

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Setup takes two credentials and the ids of your categories.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| WordPress | A site with a credential in n8n: a username, its password and the site address |
| OpenAI | An API key |
| Categories | Created in WordPress, with their ids to hand |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a WordPress credential and select it in `Get All Wordpress Posts` and `Wordpress`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model`.
4. In WordPress, open Posts, then Categories, and read each category’s id from the address of its edit page.
5. In `AI Agent`, replace each `<CATEGORY_ID_n>` with an id and each name with your own.
6. Try it on a copy of the site, then click Test workflow.

### How to use it

Click Test workflow and wait for the run to finish. Then open the posts list in WordPress and check the categories. Try a copy of the site first, since the run replaces each post’s categories.

What to change for a different result

| To change | Where |
| --- | --- |
| The categories | The list in the prompt of \`AI Agent\` |
| The model | \`OpenAI Chat Model\` |
| Which posts | The options in \`Get All Wordpress Posts\`, such as Status |
| When it runs | Swap the manual trigger for a schedule |

### Example

A blogger lists six categories with the id of each and runs the workflow. One post is titled “Ten AI tools for writers”.

The model answers with the id of the AI Tools category, and the post now sits in it. The same happens for every other published post.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here one box fetches the posts, one asks the AI for a category number and one saves it. Run it on a test site first.

**For experts.** The agent is a Tools Agent with no tools and only a model. Its prompt asks for the id alone, and `Wordpress` sends that text as the post’s `categories`.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Get All Wordpress Posts\` | Fetches all the published posts | Return All is on |
| \`AI Agent\` | Picks one category id from the title | The prompt reads \`title.rendered\` |
| \`OpenAI Chat Model\` | Supplies the model | It names \`gpt-5.6-terra\` |
| \`Wordpress\` | Updates the post | \`categories\` replaces the post’s categories |

### Good to know

The update replaces a post’s categories, and nothing checks the model’s answer against your list.

- The repair: the chat model named no model, so n8n’s default \`gpt-5-mini\` would run, which OpenAI’s deprecations page, read on 12 November 2026, lists as shut down on 11 December 2026. This copy names \`gpt-5.6-terra\`
- Placeholders: the category ids in the prompt are \`\<CATEGORY\_ID\_1\>\` to \`\<CATEGORY\_ID\_6\>\` until you set them
- Titles only: the model never sees the body of a post
- Status: no status is set, so only published posts are fetched, which is WordPress’s default for a list of posts
- Not run: this copy was not run against WordPress or OpenAI
- Your data: the titles go to OpenAI, and the categories go to WordPress
- Credentials: the JSON holds none

## README

```markdown
# WordPress posts put in a category by AI from the title

An n8n workflow that reads every published post of a WordPress site, asks an AI model to pick one category for each post from its title, and saves that category on the post.

## What is inside

- `workflow.json`: the workflow as n8n exports it, nine nodes: five that do the work and four sticky notes. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- The credential links are gone. Select your own for WordPress and OpenAI.
- The prompt listed category ids 13 to 19 with names that belong to one site. They are now `<CATEGORY_ID_1>` to `<CATEGORY_ID_6>`, so you put in the ids of your own categories.
- The chat model named no model, so n8n's default `gpt-5-mini` would run. OpenAI's deprecations page, read on 12 November 2026, lists it as shut down on 11 December 2026, with `gpt-5.6-terra` as the replacement. This copy names `gpt-5.6-terra`.
- The sticky notes were rewritten. One of them linked to a case study and a video. It now says what the workflow does and warns that categories are replaced.
- Nothing else.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A WordPress site with a credential in n8n: a username, its password and the site address. A WordPress application password works for this.
- An OpenAI API key.
- The categories you want, created in WordPress.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a WordPress credential and select it in `Get All Wordpress Posts` and `Wordpress`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model`.
4. In WordPress, open Posts, then Categories. Open a category and read its id, `tag_ID`, in the address. Do this for each category.
5. In `AI Agent`, replace each `<CATEGORY_ID_n>` with an id and each name with your own.
6. Try it first on a copy of the site, then click Test workflow.

## How a run goes

1. `When clicking ‘Test workflow’` starts the run by hand.
2. `Get All Wordpress Posts` fetches all the published posts. Return All is on.
3. `AI Agent` receives each post's title, `title.rendered`, with the category list, and answers with one number.
4. `Wordpress` updates the post. The post id comes from the posts node, and `categories` holds the agent's answer.

## Change the look

- The categories: the list in the prompt of `AI Agent`.
- The model: `OpenAI Chat Model`.
- Which posts: the options in `Get All Wordpress Posts`, such as Status, to include drafts.
- When it runs: swap the manual trigger for a schedule. Then it sorts every post on each run.

## Good to know

- The update replaces the categories a post already has with the one the model picked.
- No status is set, so the node asks for published posts, the default in WordPress's list of posts.
- Nothing checks that the answer is an id from your list. An answer with other text reaches WordPress as the category value.
- The model sees only the title, not the body of the post, and makes one call per post.
- This copy was not run against WordPress or OpenAI.
- The titles go to OpenAI, and the categories go to WordPress.
- The JSON holds no credential.
```

## What is in it

3 files, 9 KB, downloaded as a zip.

```text
NOTICE.md  608 B
README.md  3 KB
workflow.json  5 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 4 steps, starting by hand
- AI: 1 step calls an AI model: AI Agent
- Sign-ins: Signs in to: WordPress and OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 3 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/323f7934-9614-40d4-a75d-1f894e74ef35)
- [Its page on Mindket](https://mindket.com/p/323f7934-9614-40d4-a75d-1f894e74ef35)
