8
n8n 中文网amn8n.com

将 WordPress 内容同步到 Pinecone 用于 OpenAI AI 聊天机器人

高级

这是一个Product, AI, Marketing领域的自动化工作流,包含 32 个节点。主要使用 Set, Merge, Aggregate, HttpRequest, ScheduleTrigger 等节点,结合人工智能技术实现智能自动化。 将 WordPress 内容同步到 Pinecone 用于 OpenAI AI 聊天机器人

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
  • Pinecone API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "ff93c7924b638fb6ca7815d8ed0b9e89bc1a4b863863649bb0ed513cdccf1946",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b1b712ea-6f07-46f8-94c2-14bd6bdf5e9b",
      "name": "页面 -> 清理JSON格式以便向量存储插入",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        -880
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "272efeb5-05a8-4c26-b2cb-89c939adab26",
      "name": "文章 -> 清理JSON格式以便向量存储插入",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        -1040
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4189f388-7e0a-4472-bb4b-bb7f0c4b9215",
      "name": "标签 -> JSON",
      "type": "n8n-nodes-base.set",
      "position": [
        -1520,
        -880
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "1d882cd0-789d-4ebb-a886-cad6dbbeebc7",
      "name": "分类 -> JSON",
      "type": "n8n-nodes-base.set",
      "position": [
        -1520,
        -1040
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "06a234b8-2d62-49ce-9af5-f819375426d5",
      "name": "计划触发器1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2620,
        -960
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "75e306b9-053f-4d4e-86dd-82213f32b8d9",
      "name": "便签18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2360,
        -1140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7b382a05-88ff-4b27-aecf-8c9270b37ce5",
      "name": "便签17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2720,
        -1140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0aa35208-233b-4e20-a53b-b1fc54edc367",
      "name": "便签15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -1800
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ae7a7208-52f5-4b66-b871-dae01429ba7a",
      "name": "[WP] 获取分类",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1820,
        -1040
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "64ef642b-4ccf-4549-a283-7a521264517f",
      "name": "[WP] 获取标签",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1820,
        -880
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "33978a9b-7de2-4e6f-8816-9580cd2ab11e",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1320,
        -1040
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d9ad07be-08cf-4286-bdc7-9f7e007b16d3",
      "name": "聚合1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1320,
        -880
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1673c33c-90ed-4bd2-be03-990265f17f14",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1020,
        -960
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "2f1c7c16-a757-4e28-9a25-973fad715e2a",
      "name": "聚合2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -820,
        -960
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "99b3cb22-9c03-450f-a56a-231c0004e88e",
      "name": "Pinecone 向量存储",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1360,
        -1260
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "d559e18b-524c-4cb5-bc35-51647d4dc186",
      "name": "OpenAI 嵌入",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1160,
        -1020
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c77093c7-4954-4a69-b6fa-29bdd21a0a7d",
      "name": "默认数据加载器",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1540,
        -1020
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fb346a65-05b7-49f2-b77e-3ab10d4b2dbd",
      "name": "令牌分割器",
      "type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
      "position": [
        2160,
        -960
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ccc22205-af40-47eb-b94f-136d966c4e3d",
      "name": "合并1",
      "type": "n8n-nodes-base.merge",
      "position": [
        520,
        -960
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "736f2a14-1fc1-4df0-9dc8-1c2b63d82705",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1560,
        -1180
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f67565d0-a9a7-4133-a3d0-ac72a82b5569",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -1400
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0305c38f-bd97-45fc-b18e-80ee5c5a6e5b",
      "name": "网站URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -2260,
        -960
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "2fca8703-5a10-4fce-9267-e1a3babb97a2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -1180
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9a23a97e-22b5-43c7-8347-0681bd23b6dc",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -1400
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "345ac3fd-92ac-4b29-bd93-2b3020d6d756",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        -1100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ff528727-c6fc-40d8-834c-bfadf2f50212",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -1100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c0e2c9af-96dc-48a4-8475-d4365cd7e55c",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        -1100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f65ceb7e-dec1-48e1-9f81-ed14708c39c0",
      "name": "便签 10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -1400
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "13ad323e-1c01-4cd3-b144-6d0d6eaddcc9",
      "name": "[WP] 导出文章",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -380,
        -1040
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "cdbf1253-f733-4bea-a308-e318eaee86f7",
      "name": "[WP] 导出页面",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -380,
        -880
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "39bebd28-d546-46de-8fe0-170106224e5e",
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1940,
        -1140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "fec9d70d-b6ad-4489-b547-137c41b4a1f5",
      "name": "便签12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -1140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Site URL": {
      "main": [
        [
          {
            "node": "[WP] GET TAGS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate2": {
      "main": [
        [
          {
            "node": "[WP] EXPORT POSTS",
            "type": "main",
            "index": 0
          },
          {
            "node": "[WP] EXPORT PAGES",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tags-> JSON": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "[WP] GET TAGS": {
      "main": [
        [
          {
            "node": "Tags-> JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Token Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Site URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "[WP] EXPORT PAGES": {
      "main": [
        [
          {
            "node": "Pages-> clear JSON formatted for vector store insertion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "[WP] EXPORT POSTS": {
      "main": [
        [
          {
            "node": "Posts -> clear JSON formatted for vector store insertion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Categories -> JSON": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "[WP] GET CATEGORIES": {
      "main": [
        [
          {
            "node": "Categories -> JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pages-> clear JSON formatted for vector store insertion": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Posts -> clear JSON formatted for vector store insertion": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 产品, 人工智能, 营销

需要付费吗?

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

工作流信息
难度等级
高级
节点数量32
分类3
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Niten Musa

Niten Musa

@nitenmusa

Just like every business has its own processes, every business will have its own AI agents — I sell and teach that transition From France 🇫🇷 — Discipline, Humility, Benevolence

外部链接
在 n8n.io 查看

分享此工作流