8
n8n 中文网amn8n.com

YouTube Shorts + 自定义MCP服务器

高级

这是一个Design, Building Blocks, AI领域的自动化工作流,包含 43 个节点。主要使用 If, Set, Wait, YouTube, Aggregate 等节点,结合人工智能技术实现智能自动化。 使用OpenAI通过MCP服务器从Reddit内容自动生成YouTube Shorts

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "4JO672cSBR899QX3",
  "meta": {
    "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e",
    "templateCredsSetupCompleted": true
  },
  "name": "YouTube Shorts + 自定义 MCP 服务器",
  "tags": [],
  "nodes": [
    {
      "id": "9194d540-0ab4-4270-b107-ef69ecd2edee",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        140,
        280
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "631009fb-bf8c-4de7-8888-af0206089c37",
      "name": "MCP Client",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        300,
        400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "169ba7fb-a9ca-4066-9592-5ea29b2487d4",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -140,
        20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4809d849-ad08-4678-aa75-843cfc1fc471",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        780,
        0
      ],
      "webhookId": "fe4501f9-3334-4fc8-b3dd-83ea0ebb14a2",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5b1b24bd-b484-4e1b-a8d7-31854f338be8",
      "name": "条件判断",
      "type": "n8n-nodes-base.if",
      "position": [
        1220,
        0
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "c3fd71b2-5ac5-4ade-b11d-e253fb083a2e",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        440,
        220
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "d98e04bd-653a-4fed-a25e-c15e8a3b64ff",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -840,
        -340
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c25a381c-6af5-46e7-8e46-1aeae7a249d8",
      "name": "下载视频",
      "type": "n8n-nodes-base.httpRequest",
      "disabled": true,
      "position": [
        1580,
        -100
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "d03f0f27-bcf4-4095-acd5-89ec16a6bf17",
      "name": "在 YouTube 上分享",
      "type": "n8n-nodes-base.youTube",
      "disabled": true,
      "position": [
        1820,
        -100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ce7d878e-95ad-4379-8b33-521e8604216c",
      "name": "当点击\"测试工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -820,
        20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c863d2cd-1e39-49c7-902e-7e2777cfc52f",
      "name": "生成视频",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        0
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "c19e8e76-1a26-44f8-99b7-8a8141616f63",
      "name": "检查视频状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        0
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "f5d16a40-2011-43d8-9f22-764702c043ed",
      "name": "映射字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -340,
        20
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "b6591020-b3f6-4b12-98ae-bf7b8b232efa",
      "name": "获取每周热门帖子",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -560,
        20
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "f24f65a7-a9c6-4662-93ad-eab824be6f9e",
      "name": "OpenAI 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        140,
        1260
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "1dcda2d7-e65f-4d59-86aa-58d6f57105e1",
      "name": "MCP 客户端 1",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        300,
        1380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "03fc4379-228f-4ec2-8573-6fb14a780073",
      "name": "聚合 1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -140,
        1000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f01ce179-5cb4-421b-983a-e13a17122efa",
      "name": "等待1",
      "type": "n8n-nodes-base.wait",
      "position": [
        780,
        980
      ],
      "webhookId": "fe4501f9-3334-4fc8-b3dd-83ea0ebb14a2",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "7dfc6e8e-5dd0-4578-a54a-f4fbc85e2a7a",
      "name": "如果 1",
      "type": "n8n-nodes-base.if",
      "position": [
        1220,
        980
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "da4806e7-5c71-4299-9c04-1fdeec14c5a5",
      "name": "结构化输出解析器 1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        440,
        1200
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "6d662051-eb85-432e-8f5a-70850e9e9725",
      "name": "下载视频 1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1580,
        880
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "2de52cb2-a5fa-424c-9bdb-601b30907d01",
      "name": "在 YouTube 上分享 1",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1820,
        880
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "77712771-a33b-409e-9b8f-7c3ae8f5fcdb",
      "name": "生成视频 1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        980
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "97e3fa58-d1be-45a7-a5ef-50a9490cf998",
      "name": "检查视频状态 1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        980
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "bbd9930a-5ae9-4540-a80f-6688192438f5",
      "name": "映射字段 1",
      "type": "n8n-nodes-base.set",
      "position": [
        -340,
        1000
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "bbb302de-89ea-4253-9497-3f26c7eaafeb",
      "name": "获取每周热门帖子 1",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -560,
        1000
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "ef8eb587-e1bd-4ca9-a132-125b38cc9b7e",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        600
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "623953f3-791a-4840-bea6-1fc10946aed7",
      "name": "OpenAI 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        100,
        2320
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "06d7642a-19f9-4ac3-b4f9-93f6f952fa26",
      "name": "MCP 客户端 2",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        260,
        2440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b7ce3ee6-c309-424c-89ad-5e65c61ae7b1",
      "name": "聚合2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -180,
        2060
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2ac82e10-c64a-4994-943a-c7ddb8bbc378",
      "name": "等待 2",
      "type": "n8n-nodes-base.wait",
      "position": [
        740,
        2040
      ],
      "webhookId": "fe4501f9-3334-4fc8-b3dd-83ea0ebb14a2",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "3b45856a-72a5-4668-a2e5-efe7fe491fd4",
      "name": "如果2",
      "type": "n8n-nodes-base.if",
      "position": [
        1180,
        2040
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "01ad80af-c90a-4102-84a6-dc5c023591e8",
      "name": "结构化输出解析器 2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        400,
        2260
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "36607337-b0aa-4d69-ad2c-4b4ae845d889",
      "name": "下载视频 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1540,
        1940
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "5f976cb3-d511-49f5-97d7-2f14635b10e3",
      "name": "在 YouTube 上分享 2",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1780,
        1940
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "14c3111c-0c76-4139-a8e8-7f2f38b50d40",
      "name": "生成视频 2",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        180,
        2040
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "d2ca10fa-5e96-4b1d-b13d-cf3df06e373c",
      "name": "检查视频状态 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        2040
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "3f0fff1e-b16f-4a82-be42-38b8d331090f",
      "name": "映射字段 2",
      "type": "n8n-nodes-base.set",
      "position": [
        -380,
        2060
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a7e082d4-44cc-4364-bc1a-b135eb626358",
      "name": "获取每周热门帖子 2",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -600,
        2060
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "801786e2-65d5-424e-96b5-d8b3c79f1ed3",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        1660
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c5e53c76-0795-4350-9e83-03bb23bb4b04",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2100,
        -140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "4a020e02-0c5a-42e7-b217-fc76d2171bae",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -840,
        -580
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5423e146-e8ec-4cd4-8040-b9596eac6d29",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -1300
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3ff9066f-3233-4034-ae35-34de1ac0b39c",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Download the video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Download the video1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Download the video2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Check video status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Check video status1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Check video status2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Generate video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Generate video1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate2": {
      "main": [
        [
          {
            "node": "Generate video2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MCP Client": {
      "ai_tool": [
        [
          {
            "node": "Generate video",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Map fields": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MCP Client1": {
      "ai_tool": [
        [
          {
            "node": "Generate video1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "MCP Client2": {
      "ai_tool": [
        [
          {
            "node": "Generate video2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Map fields1": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map fields2": {
      "main": [
        [
          {
            "node": "Aggregate2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate video": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate video1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate video2": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate video",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check video status": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download the video": {
      "main": [
        [
          {
            "node": "Share on YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate video1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Generate video2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check video status1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check video status2": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download the video1": {
      "main": [
        [
          {
            "node": "Share on YouTube1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download the video2": {
      "main": [
        [
          {
            "node": "Share on YouTube2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get top weekly posts": {
      "main": [
        [
          {
            "node": "Map fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get top weekly posts1": {
      "main": [
        [
          {
            "node": "Map fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get top weekly posts2": {
      "main": [
        [
          {
            "node": "Map fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate video",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Generate video1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "Generate video2",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get top weekly posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 设计, 构建模块, 人工智能

需要付费吗?

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

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

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

作者
jolonbankey

jolonbankey

@jolonbankey

automation consultant with over 5 years experience helping sales and marketing teams to streamline their processes

外部链接
在 n8n.io 查看

分享此工作流