8
n8n 中文网amn8n.com

从 YouTube 视频自动生成博客文章到 WordPress 和 Webflow(模板)

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 21 个节点。主要使用 Set, Wait, Webflow, YouTube, Markdown 等节点。 使用 OpenAI GPT 从 YouTube 视频生成博客文章到 WordPress 和 Webflow

前置要求
  • Telegram Bot Token
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "STYgmx1IQLxQcLcA",
  "meta": {
    "instanceId": "506e1eb999b7a8cf86103921b3e1b94e371534d9bae39d44754933678dc6697d",
    "templateCredsSetupCompleted": true
  },
  "name": "从 YouTube 视频自动生成博客文章到 WordPress 和 Webflow(模板)",
  "tags": [
    {
      "id": "T3xhK1cIuPex0boX",
      "name": "Templates",
      "createdAt": "2025-09-03T11:06:03.839Z",
      "updatedAt": "2025-09-03T11:06:03.839Z"
    }
  ],
  "nodes": [
    {
      "id": "f33a19fb-1da8-434e-a6f4-aaa8e346f510",
      "name": "提取视频数据",
      "type": "n8n-nodes-base.set",
      "position": [
        96,
        48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "video_title",
              "name": "videoTitle",
              "type": "string",
              "value": "={{ $json.snippet.title }}"
            },
            {
              "id": "video_url",
              "name": "videoUrl",
              "type": "string",
              "value": "={{ $('Monitor YouTube Feed').item.json.link }}"
            },
            {
              "id": "video_id",
              "name": "videoId",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "thumbnail_url",
              "name": "thumbnailUrl",
              "type": "string",
              "value": "={{ $json.snippet.thumbnails.maxres.url }}"
            },
            {
              "id": "4125ae80-9be8-4281-9012-c217ee413c05",
              "name": "videoDescription",
              "type": "string",
              "value": "={{ $json.snippet.description }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "92ed5826-54c7-4f20-b017-62fa6cb3f5cc",
      "name": "格式化博客文章",
      "type": "n8n-nodes-base.set",
      "position": [
        672,
        48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "blog_title",
              "name": "blogTitle",
              "type": "string",
              "value": "={{ $json.message.content.match(/#\\s*(.+)/)[1].trim() }}\n"
            },
            {
              "id": "blog_content",
              "name": "blogContent",
              "type": "string",
              "value": "={{ $json.message.content.replace(/```(?:\\w+)?\\n?/, '').replace(/```$/, '').trim() }}"
            },
            {
              "id": "blog_slug",
              "name": "blogSlug",
              "type": "string",
              "value": "={{ $('Extract Video Data').item.json.videoTitle.toLowerCase().replace(/[^a-z0-9]/g, '-').replace(/-+/g, '-').replace(/^-|-$/g, '') }}"
            },
            {
              "id": "featured_image",
              "name": "featuredImage",
              "type": "string",
              "value": "={{ $('Extract Video Data').item.json.thumbnailUrl }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "492fca15-3711-4357-b5d1-8d68e4b11ee5",
      "name": "发布到 WordPress",
      "type": "n8n-nodes-base.wordpress",
      "onError": "continueErrorOutput",
      "maxTries": 2,
      "position": [
        1136,
        -112
      ],
      "parameters": {
        "title": "={{ $json.blogTitle }}",
        "additionalFields": {
          "slug": "={{ $json.blogSlug }}",
          "tags": [
            6
          ],
          "content": "={{ $json.data }}",
          "categories": [
            5
          ]
        }
      },
      "credentials": {
        "wordpressApi": {
          "id": "XdwvkGFuVxDMC76j",
          "name": "Wordpress (Dummy Account)"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "886d2a08-c897-4b6e-a517-71a30acc5230",
      "name": "发布到 Webflow",
      "type": "n8n-nodes-base.webflow",
      "onError": "continueErrorOutput",
      "position": [
        1120,
        240
      ],
      "parameters": {
        "siteId": "653a17a1b31a397763f3ce40",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "name",
              "fieldValue": "={{ $json.blogTitle }}"
            },
            {
              "fieldId": "page-content",
              "fieldValue": "={{ $json.data }}"
            },
            {
              "fieldId": "slug",
              "fieldValue": "={{ $json.blogSlug }}"
            },
            {
              "fieldId": "featured-image",
              "fieldValue": "={{ $json.featuredImage }}"
            }
          ]
        },
        "operation": "create",
        "collectionId": "68c01d34f15ae8b8c30ead31"
      },
      "credentials": {
        "webflowOAuth2Api": {
          "id": "NqkfDWqbJpAotiw2",
          "name": "Webflow (Dummy Account)"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d3f9bbb3-5eb6-4b87-9e0d-8ea7001e139a",
      "name": "工作流信息",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        -496
      ],
      "parameters": {
        "width": 350,
        "height": 1072,
        "content": "# 信息"
      },
      "typeVersion": 1
    },
    {
      "id": "b01b6aac-9da4-4be7-bcdd-0b4d9d833679",
      "name": "提取说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 180,
        "height": 320,
        "content": "提取视频标题、描述、URL、缩略图。为博客文章创建干净的别名"
      },
      "typeVersion": 1
    },
    {
      "id": "e691bd51-6c31-4b1a-9d84-284a034bc10c",
      "name": "AI 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 336,
        "content": "使用 OpenAI 创建具有适当结构和吸引人内容的全面博客文章"
      },
      "typeVersion": 1
    },
    {
      "id": "3a24524a-7ef9-468c-a962-e8875da10540",
      "name": "格式化说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 180,
        "height": 368,
        "content": "清理 AI 响应并准备最终的博客文章结构"
      },
      "typeVersion": 1
    },
    {
      "id": "7dce235b-13dc-4d69-8914-387642105549",
      "name": "发布说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -256
      ],
      "parameters": {
        "color": 7,
        "width": 200,
        "height": 692,
        "content": "发布到 WordPress 和/或 Webflow。错误处理确保即使一个平台失败,工作流也能继续"
      },
      "typeVersion": 1
    },
    {
      "id": "b9d5764a-2718-4c15-888f-4908ee35ef1c",
      "name": "发送错误通知",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1456,
        -208
      ],
      "webhookId": "558de280-9983-4f9b-9e73-7e4b8dad73d4",
      "parameters": {
        "text": "=❌ Blog post creation failed on Wordpress!\n\nVideo: {{ $('Get video details').item.json.snippet.title }}\nError: {{ $json.error }}\nTime: {{ $now }}",
        "chatId": "=CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "oidgpxSPzvIVyYWw",
          "name": "Telegram (Dummy Account)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7118630c-981e-4103-ac8b-acd62d3d084c",
      "name": "提取说明1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 180,
        "height": 320,
        "content": "使用视频 ID 提取完整描述以获取额外上下文"
      },
      "typeVersion": 1
    },
    {
      "id": "284f96ec-094b-416b-8e51-22bba9190b14",
      "name": "格式化说明1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 180,
        "height": 304,
        "content": "将 Markdown 格式化为 HTML 以用于 Webflow 和 WordPress"
      },
      "typeVersion": 1
    },
    {
      "id": "9223ad51-d408-4348-964c-778f1efeea56",
      "name": "每周 RSS 检查",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -800,
        128
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 21
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4b99efde-5648-4962-a0ef-e97f34b1283e",
      "name": "监控 YouTube 订阅源",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -576,
        128
      ],
      "parameters": {
        "url": "https://www.youtube.com/feeds/videos.xml?channel_id=UXXXXXXXXX",
        "options": {}
      },
      "executeOnce": false,
      "typeVersion": 1.2
    },
    {
      "id": "152dffb6-38bb-4f83-bbf6-bfd7d1736969",
      "name": "获取视频详情",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -128,
        48
      ],
      "parameters": {
        "options": {},
        "videoId": "={{ $json.link.split('=')[1] }}",
        "resource": "video",
        "operation": "get"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "67GXnxjAQ5XhUcpI",
          "name": "YouTube (Dummy Account)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dd501db5-689c-47b3-94f1-c4c3d1bcd181",
      "name": "处理每个视频",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -352,
        128
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "4e0a8146-ed68-4301-b698-ea539c83382b",
      "name": "AI 博客生成器",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        320,
        48
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {
          "temperature": 0.7
        },
        "messages": {
          "values": [
            {
              "content": "=Write a comprehensive blog post about this YouTube video:\n\nVideo Title: {{ $json.videoTitle }}\nVideo Description: {{ $json.videoDescription }}\nVideo URL: {{ $json.videoUrl }}\n\nCreate a blog post that:\n1. Has an engaging headline (different from video title)\n2. Includes compelling introduction\n3. Summarizes key points from the video\n4. Adds valuable insights and context\n5. Uses relevant subheadings (## for H2)\n6. Ends with call-to-action to watch the video\n7. Is 600-800 words\n8. Uses conversational, engaging tone\n9. Targets no-code developers and Bubble.io users\n\nImportant: Format in markdown with proper structure."
            },
            {
              "role": "system",
              "content": "=You are an expert content writer who creates engaging blog posts from YouTube videos across all topics and industries. \n\nWrite in a conversational, accessible tone that educates and engages readers regardless of subject matter. Focus on extracting key insights, providing context, and making complex topics understandable.\n\nAlways structure content with clear headings, actionable takeaways, and encourage readers to watch the original video for the complete experience."
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "mvWns3smwtPV0N7O",
          "name": "OpenAI (Dummy Account)"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "eb5d8c55-3806-4e7f-bbc7-7d41879a0ad1",
      "name": "转换为 HTML",
      "type": "n8n-nodes-base.markdown",
      "position": [
        896,
        48
      ],
      "parameters": {
        "mode": "markdownToHtml",
        "options": {},
        "markdown": "={{ $json.blogContent }}"
      },
      "typeVersion": 1
    },
    {
      "id": "9313716b-396f-417d-a0de-3dc8b6921c2f",
      "name": "速率限制延迟",
      "type": "n8n-nodes-base.wait",
      "position": [
        1712,
        96
      ],
      "webhookId": "f3efd4a0-6e88-440b-af08-14a04fe2b8e3",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "375eae45-91ea-4057-b704-768a862137f4",
      "name": "发送错误警报",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1472,
        464
      ],
      "webhookId": "8c2d83bc-d100-4a12-863a-4f1eda8d7f35",
      "parameters": {
        "text": "=❌ Blog post creation failed on Webflow!\n\nVideo: {{ $('Get video details').item.json.snippet.title }}\nError: {{ $json.error }}\nTime: {{ $now }}",
        "chatId": "=CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "oidgpxSPzvIVyYWw",
          "name": "Telegram (Dummy Account)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e4d69452-8b9c-48c4-bb64-0af2bc4e9e51",
      "name": "发布说明1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        -368
      ],
      "parameters": {
        "color": 7,
        "width": 216,
        "height": 1012,
        "content": "可选:您可以只保留一个通知节点"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "35df95f2-f10f-4625-aafe-6a09a9a0dcda",
  "connections": {
    "Convert to HTML": {
      "main": [
        [
          {
            "node": "Publish to WordPress",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to Webflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Blog Post": {
      "main": [
        [
          {
            "node": "Convert to HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Delay": {
      "main": [
        [
          {
            "node": "Process Each Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly RSS Check": {
      "main": [
        [
          {
            "node": "Monitor YouTube Feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Blog Generator": {
      "main": [
        [
          {
            "node": "Format Blog Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get video details": {
      "main": [
        [
          {
            "node": "Extract Video Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Video Data": {
      "main": [
        [
          {
            "node": "AI Blog Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Video": {
      "main": [
        [],
        [
          {
            "node": "Get video details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Webflow": {
      "main": [
        [
          {
            "node": "Rate Limit Delay",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitor YouTube Feed": {
      "main": [
        [
          {
            "node": "Process Each Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to WordPress": {
      "main": [
        [
          {
            "node": "Rate Limit Delay",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

工作流信息
难度等级
高级
节点数量21
分类2
节点类型12
难度说明

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

作者
Dahiana

Dahiana

@mssporto

No-Code Specialist with more than 10 years of experience in Digital Marketing. Currently working with Bubble. Webflow, AI, Agents and N8N.

外部链接
在 n8n.io 查看

分享此工作流