8
n8n 中文网amn8n.com

自动分类WordPress模板

中级

这是一个AI, Marketing领域的自动化工作流,包含 9 个节点。主要使用 Wordpress, ManualTrigger, Agent, LmChatOpenAi 等节点,结合人工智能技术实现智能自动化。 使用AI自动分类WordPress博客文章

前置要求
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "caaf1WFANPKAikiH",
  "meta": {
    "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
    "templateCredsSetupCompleted": true
  },
  "name": "自动分类 WordPress 模板",
  "tags": [],
  "nodes": [
    {
      "id": "2017403c-7496-48f8-a487-8a017c7adfe3",
      "name": "当点击\"测试工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        680,
        320
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "82ff288f-4234-4192-9046-33e5ffee5264",
      "name": "Wordpress",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        1500,
        320
      ],
      "parameters": {
        "postId": "={{ $('Get All Wordpress Posts').item.json.id }}",
        "operation": "update",
        "updateFields": {
          "categories": "={{ $json.output }}"
        }
      },
      "credentials": {
        "wordpressApi": {
          "id": "lGWPwxTdfPDDbFjj",
          "name": "Rumjahn.com wordpress"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "521deb22-62dd-4b5f-8b9a-aab9777821da",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -100
      ],
      "parameters": {
        "width": 504.88636363636317,
        "content": "## 如何使用 A.I. 在2分钟内自动分类82篇博客文章(无需编码)"
      },
      "typeVersion": 1
    },
    {
      "id": "4090d827-f8cd-47ef-ad4f-654ee58216f6",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        180
      ],
      "parameters": {
        "color": 3,
        "width": 188.14814814814804,
        "height": 327.3400673400663,
        "content": "### 获取 WordPress 文章"
      },
      "typeVersion": 1
    },
    {
      "id": "71585d54-fdcc-42a5-8a0e-0fac3adc1809",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        80
      ],
      "parameters": {
        "color": 4,
        "width": 315.1464152082392,
        "height": 416.90235690235625,
        "content": "### A.I. 分类"
      },
      "typeVersion": 1
    },
    {
      "id": "29354054-8600-4e45-99d0-6f30f779a505",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        240
      ],
      "parameters": {
        "color": 5,
        "width": 171.64983164983155,
        "height": 269.59595959595947,
        "content": "### 更新分类"
      },
      "typeVersion": 1
    },
    {
      "id": "d9fe6289-6b97-4830-80aa-754ac4d4b3e0",
      "name": "获取所有 WordPress 文章",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        900,
        320
      ],
      "parameters": {
        "options": {},
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wordpressApi": {
          "id": "lGWPwxTdfPDDbFjj",
          "name": "Rumjahn.com wordpress"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ed40bf13-8294-4b4e-a8b6-5749989d3420",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1080,
        540
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "XO3iT1iYT5Vod56X",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dafeb935-532e-4067-9dfb-7e9a6bbc4e5a",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1100,
        320
      ],
      "parameters": {
        "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": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2a753171-425f-4b5a-bd1b-8591ad2d142c",
  "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 ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get All Wordpress Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人工智能, 营销

需要付费吗?

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

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

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

作者
Keith Rumjahn

Keith Rumjahn

@rumjahn

I create automations with A.I. for SEO content and other smart automations.

外部链接
在 n8n.io 查看

分享此工作流