This workflow corresponds to n8n.io template #2706 — we link there as the canonical source.
This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"active": false,
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Wordpress",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get All Wordpress Posts": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "Get All Wordpress Posts",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2025-02-06T15:04:44.928Z",
"id": "z7tD7OvL5uwEi1Ui",
"meta": {
"templateId": "2706"
},
"name": "Auto-Categorize blog posts in wordpress using A.I.",
"nodes": [
{
"parameters": {},
"id": "2017403c-7496-48f8-a487-8a017c7adfe3",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
440,
660
],
"typeVersion": 1
},
{
"parameters": {
"operation": "update",
"postId": "={{ $('Get All Wordpress Posts').item.json.id }}",
"updateFields": {
"categories": "={{ $json.output }}"
}
},
"id": "82ff288f-4234-4192-9046-33e5ffee5264",
"name": "Wordpress",
"type": "n8n-nodes-base.wordpress",
"position": [
1260,
660
],
"typeVersion": 1
},
{
"parameters": {
"content": "## How to Auto-Categorize 82 Blog Posts in 2 Minutes using A.I. (No Coding Required)\n\n\ud83d\udca1 Read the [case study here](https://rumjahn.com/how-to-use-a-i-to-categorize-wordpress-posts-and-streamline-your-content-organization-process/).\n\n\ud83d\udcfa Watch the [youtube tutorial here](https://www.youtube.com/watch?v=IvQioioVqhw)\n\n",
"width": 504.88636363636317
},
"id": "521deb22-62dd-4b5f-8b9a-aab9777821da",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
240
],
"typeVersion": 1
},
{
"parameters": {
"content": "### Get wordpress posts\n\nTurn off return all if you're running into issues.\n",
"height": 327.3400673400663,
"width": 188.14814814814804,
"color": 3
},
"id": "4090d827-f8cd-47ef-ad4f-654ee58216f6",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
520
],
"typeVersion": 1
},
{
"parameters": {
"content": "### A.I. Categorization\n\n1. you need to set up the categories first in wordpress\n\n2. Edit the message prompt and change the categories and category numbers",
"height": 416.90235690235625,
"width": 315.1464152082392,
"color": 4
},
"id": "71585d54-fdcc-42a5-8a0e-0fac3adc1809",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
420
],
"typeVersion": 1
},
{
"parameters": {
"content": "### Update category",
"height": 269.59595959595947,
"width": 171.64983164983155,
"color": 5
},
"id": "29354054-8600-4e45-99d0-6f30f779a505",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1240,
580
],
"typeVersion": 1
},
{
"parameters": {
"operation": "getAll",
"returnAll": true,
"options": {}
},
"id": "d9fe6289-6b97-4830-80aa-754ac4d4b3e0",
"name": "Get All Wordpress Posts",
"type": "n8n-nodes-base.wordpress",
"position": [
660,
660
],
"typeVersion": 1
},
{
"parameters": {
"options": {}
},
"id": "ed40bf13-8294-4b4e-a8b6-5749989d3420",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
840,
880
],
"typeVersion": 1
},
{
"parameters": {
"promptType": "define",
"text": "=You are an expert content strategist and taxonomy specialist with extensive experience in blog categorization and content organization.\n\nI will provide you with a blog post's title. Your task is to assign ONE primary category ID from this fixed list:\n\n13 = Content Creation\n14 = Digital Marketing\n15 = AI Tools\n17 = Automation & Integration\n18 = Productivity Tools\n19 = Analytics & Strategy\n\nAnalyze the title and return only the single most relevant category ID number that best represents the main focus of the post. While a post might touch on multiple topics, select the dominant theme that would be most useful for navigation purposes.\n\n{{ $json.title.rendered }}\n\nOutput only the category number",
"options": {}
},
"id": "dafeb935-532e-4067-9dfb-7e9a6bbc4e5a",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
860,
660
],
"typeVersion": 1.7
}
],
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 0,
"updatedAt": "2025-02-06T15:04:44.928Z",
"versionId": "486e4a10-5f02-4150-9421-52bd70c8d6eb"
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApiwordpressApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WordPress Post Auto-Categorization Workflow
Source: https://n8n.io/workflows/2706/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is ideal for content creators, marketers, and businesses looking to streamline the creation of SEO-optimized blog posts for WordPress. It is particularly suited for professionals in the
The blogblizt: polylang workflow streamlines the creation and publication of high-quality blog content using powerful automation with n8n, OpenAI’s GPT and the WordPress API. It enables effortlessly g
14-Generate_SEO_Optimized_WordPress_Content_with_AI_Powered_Perplexity_Research. Uses wordpress, lmChatOpenAi, outputParserStructured, agent. Event-driven trigger; 25 nodes.
Automates flight deal discovery and intelligent analysis for travel bloggers and deal hunters. Scrapes live pricing, enriches with weather data, applies AI evaluation, and auto-publishes to WordPress—
Social Media Content Pipeline. Uses formTrigger, lmChatOpenAi, perplexityTool, twitter. Event-driven trigger; 13 nodes.