AutomationFlowsContent & Video › Automate Wordpress Category Mapping with Gpt-5 Mini (azure Openai)

Automate Wordpress Category Mapping with Gpt-5 Mini (azure Openai)

ByKhairul Muhtadin @khmuhtadin on n8n.io

WP Category Toolkit automates mapping content topics to your WordPress category IDs using your WordPress REST API and a GPT-5mini model.

Event trigger★★★☆☆ complexityAI-powered8 nodesHTTP RequestChain LlmLm Chat Azure Open Ai
Content & Video Trigger: Event Nodes: 8 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7207 — we link there as the canonical source.

This workflow follows the Chainllm → HTTP Request 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 →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "0e83e20c-e43d-4625-9bdc-5d82b3b9e341",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        368
      ],
      "parameters": {
        "color": 3,
        "width": 370,
        "height": 100,
        "content": "## \u2615 Appreciate This Workflow?\n\nSupport the creator by sending coffee:\n\n**PayPal:** [paypal.me/khmuhtadin](https://paypal.me/khmuhtadin)\n\nThank you! \ud83d\ude80"
      },
      "typeVersion": 1
    },
    {
      "id": "cc2cef53-7df3-4917-a882-860d553f5104",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        112,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "06540637-8291-455c-86f2-e27f9ffab397",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        128
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 352,
        "content": "## Process:\n- change with your url\n- Input your WP credentials\n- Copy ``category json`` from **Body Post Wordpress**\n- Paste in system prompt on **Category Mapping**\n- Copy the result back to **Body Post Wordpress**"
      },
      "typeVersion": 1
    },
    {
      "id": "4a718b76-e00b-4929-ad13-f64db481e9a1",
      "name": "Get All Categories",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        304,
        208
      ],
      "parameters": {
        "url": "https://cartilo.my.id/wp-json/wp/v2/categories?per_page=100",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c7495577-3d61-4706-a770-a169bf28b801",
      "name": "Aggregate to Process",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        496,
        208
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "ca148b94-896b-4843-9710-28455e5d286c",
      "name": "Category-Mapping",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        672,
        208
      ],
      "parameters": {
        "text": "={{JSON.stringify($json)}}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are an expert programmer. \n\nchange this mapping:\n {{ $('Topic Chooser and Title Maker').item.json.output.category == \"Technology\" ? [3] :\n    $('Topic Chooser and Title Maker').item.json.output.category == \"Artificial Intelligence (AI)\" ? [4] :\n    $('Topic Chooser and Title Maker').item.json.output.category == \"Tech Fact\" ? [7] :\n    $('Topic Chooser and Title Maker').item.json.output.category == \"Tech History\" ? [8] :\n    $('Topic Chooser and Title Maker').item.json.output.category == \"Tech Tips\" ? [9] : [1] }}\n\nbased on user input.\nonly change category and the id. never add \"\\n\" in the output"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "e252bdd8-767f-4269-9499-7dcd71477d74",
      "name": "Gpt-5-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        672,
        368
      ],
      "parameters": {
        "model": "gpt5mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "221fd7d7-bc4b-4f28-8970-383917810d75",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        48
      ],
      "parameters": {
        "color": 5,
        "width": 1328,
        "height": 480,
        "content": "## WP Category toolkit"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Get All Categories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gpt-5-mini": {
      "ai_languageModel": [
        [
          {
            "node": "Category-Mapping",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get All Categories": {
      "main": [
        [
          {
            "node": "Aggregate to Process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate to Process": {
      "main": [
        [
          {
            "node": "Category-Mapping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

WP Category Toolkit automates mapping content topics to your WordPress category IDs using your WordPress REST API and a GPT-5mini model.

Source: https://n8n.io/workflows/7207/ — original creator credit. Request a take-down →

More Content & Video workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Content & Video

Automate Blog Creation In Brand Voice With Ai. Uses manualTrigger, lmChatOpenAi, informationExtractor, httpRequest. Event-driven trigger; 27 nodes.

OpenAI Chat, Information Extractor, HTTP Request +2
Content & Video

📄✨ Easy Wordpress Content Creation from PDF Document + Human In The Loop with Gmail Approval. Uses stickyNote, formTrigger, extractFromFile, lmChatOpenAi. Event-driven trigger; 27 nodes.

Form Trigger, OpenAI Chat, HTTP Request +4
Content & Video

Splitout Limit. Uses manualTrigger, lmChatOpenAi, informationExtractor, httpRequest. Event-driven trigger; 27 nodes.

OpenAI Chat, Information Extractor, HTTP Request +2
Content & Video

Workflow 2648. Uses lmChatOpenAi, informationExtractor, httpRequest, wordpress. Event-driven trigger; 27 nodes.

OpenAI Chat, Information Extractor, HTTP Request +2
Content & Video

2648. Uses lmChatOpenAi, informationExtractor, httpRequest, wordpress. Event-driven trigger; 27 nodes.

OpenAI Chat, Information Extractor, HTTP Request +2