8
n8n 中文网amn8n.com

WP分类工具包

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 Aggregate, HttpRequest, ManualTrigger, ChainLlm, LmChatAzureOpenAi 等节点。 使用GPT-5 Mini(Azure OpenAI)自动化WordPress分类映射

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "BeW87UQSm16ZhE2D",
  "meta": {
    "instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c"
  },
  "name": "WP 分类工具包",
  "tags": [],
  "nodes": [
    {
      "id": "800015fb-a2ec-4838-b70f-465f9200fcd2",
      "name": "开始",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        384,
        160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3b66a7e3-6567-4a48-9e52-b72d3e568517",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 1328,
        "height": 480,
        "content": "## WP 分类工具包"
      },
      "typeVersion": 1
    },
    {
      "id": "07e8b165-4124-4a09-b569-7090464b6f63",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        80
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 352,
        "content": "## 处理流程:"
      },
      "typeVersion": 1
    },
    {
      "id": "36eeebd5-4cc4-4d96-900d-70299c55010e",
      "name": "获取所有分类",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        160
      ],
      "parameters": {
        "url": "https://cartilo.my.id/wp-json/wp/v2/categories?per_page=100",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "gGfRrkCtaoISRmDr",
          "name": "WP - Cartilo (Dax AI)"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "51f177cd-1b53-4225-8c96-cc157e9d986b",
      "name": "聚合处理",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        768,
        160
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "d655510d-2e55-4994-9cc5-3d7f6b57f2a1",
      "name": "分类映射",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        944,
        160
      ],
      "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": "8e856d5b-0de8-44d3-a887-3b8188b80e65",
      "name": "Gpt-5-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        944,
        320
      ],
      "parameters": {
        "model": "gpt5mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "id": "f2y13FBDaQZYGn8T",
          "name": "GPT5-mini"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b41ae1d6-00b2-442f-b7dc-b96e11163121",
  "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
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 内容创作, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量7
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流