8
n8n 中文网amn8n.com

通过 AI 审核从 RSS 源生成博客文章

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 23 个节点。主要使用 If, Code, Slack, GoogleDocs, RssFeedRead 等节点。 使用 GPT-4、人工审核和 Google Docs 将 RSS 源转换为博客文章

前置要求
  • Slack Bot Token 或 Webhook URL
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "HI2iE8VwG75jxXJH",
  "meta": {
    "instanceId": "062f0e1ec3617ffb26cbc1b3c3518f28f3e57f08ddc210c471f532bb0bd6cf07"
  },
  "name": "通过 AI 审核从 RSS 源生成博客文章",
  "tags": [],
  "nodes": [
    {
      "id": "d11df7cb-6c60-42a6-9a24-de65390adf7a",
      "name": "便签 - 概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -16
      ],
      "parameters": {
        "width": 640,
        "height": 792,
        "content": "## 📰 带人工审核的 RSS 到博客文章生成器"
      },
      "typeVersion": 1
    },
    {
      "id": "ef01e50e-5e8b-454b-b77c-1efbea20db43",
      "name": "便利贴 - 步骤1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        432
      ],
      "parameters": {
        "color": 7,
        "height": 128,
        "content": "### 1️⃣ 计划触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "45e8be75-c5d1-46da-b5e0-f66e47e0c4c3",
      "name": "便利贴 - 步骤2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        160
      ],
      "parameters": {
        "color": 7,
        "height": 112,
        "content": "### 2️⃣ 获取 RSS 源"
      },
      "typeVersion": 1
    },
    {
      "id": "9c0ed906-df38-4b1d-842f-985bf8b615b1",
      "name": "便利贴 - 步骤3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        432
      ],
      "parameters": {
        "color": 7,
        "height": 96,
        "content": "### 3️⃣ 处理数据"
      },
      "typeVersion": 1
    },
    {
      "id": "606c9ace-1003-44da-b72e-f6b2f062c5a7",
      "name": "便利贴 - 步骤4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        160
      ],
      "parameters": {
        "color": 7,
        "height": 112,
        "content": "### 4️⃣ AI 文章生成"
      },
      "typeVersion": 1
    },
    {
      "id": "72bd534f-a617-4d5e-bcff-f908b8ca9793",
      "name": "便利贴 - 步骤5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        464
      ],
      "parameters": {
        "color": 7,
        "height": 112,
        "content": "### 5️⃣ 格式化文章数据"
      },
      "typeVersion": 1
    },
    {
      "id": "a1d59531-72b7-44c5-a86f-2f7777a5825d",
      "name": "便签 - 步骤 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        144
      ],
      "parameters": {
        "color": 7,
        "height": 128,
        "content": "### 6️⃣ 人工审核请求"
      },
      "typeVersion": 1
    },
    {
      "id": "71db4973-03b3-47ca-b7d4-54e3c5e46c82",
      "name": "便签 - 步骤 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        448
      ],
      "parameters": {
        "color": 7,
        "height": 112,
        "content": "### 7️⃣ 审核检查"
      },
      "typeVersion": 1
    },
    {
      "id": "5d87deaa-82bb-45f2-b69d-0996eba75eef",
      "name": "便签 - 步骤 8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        112
      ],
      "parameters": {
        "color": 7,
        "height": 144,
        "content": "### 8️⃣ 发布到 Google Docs"
      },
      "typeVersion": 1
    },
    {
      "id": "0101e6ba-48c1-42c7-8ad1-9b6f3fd24a80",
      "name": "便签 - 步骤 9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2064,
        144
      ],
      "parameters": {
        "color": 7,
        "height": 96,
        "content": "### 9️⃣ 团队通知"
      },
      "typeVersion": 1
    },
    {
      "id": "aa539528-6344-4b14-9845-9b50212bbca9",
      "name": "格式化 RSS 数据",
      "type": "n8n-nodes-base.code",
      "position": [
        496,
        288
      ],
      "parameters": {
        "jsCode": "// Extract and format RSS feed data for article generation\nconst items = $input.all();\n\nif (items.length === 0) {\n  throw new Error('No articles found in RSS feed');\n}\n\n// Process latest article (modify to process multiple articles if needed)\nconst rssData = items[0].json;\n\n// Extract topic from RSS title\nconst topic = rssData.title || rssData.headline || 'Untitled';\n\n// Get article description/summary\nconst description = rssData.content || rssData.description || rssData.summary || '';\n\n// Extract keywords from title (simple word extraction)\nconst keywords = topic\n  .replace(/[「」『』()()、。!?]/g, ' ')\n  .split(/\\s+/)\n  .filter(word => word.length > 2)\n  .slice(0, 5)\n  .join(', ');\n\nreturn [{\n  json: {\n    topic: topic,\n    keywords: keywords || 'Technology, News',\n    target_length: '1500-2000 words',\n    tone: 'Professional and accessible',\n    keywords_array: keywords.split(',').map(k => k.trim()).filter(k => k),\n    original_url: rssData.link || rssData.url || '',\n    original_title: topic,\n    original_description: description.substring(0, 200),\n    pub_date: rssData.pubDate || new Date().toISOString()\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "fc26315d-54be-4d57-ab71-dbec113a0d3f",
      "name": "使用 AI 生成文章",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        736,
        288
      ],
      "parameters": {
        "text": "=You are a professional content writer. Based on the following news article, create a detailed and engaging blog post.\n\n【Source Article】\nTitle: {{ $json.original_title }}\nSummary: {{ $json.original_description }}\nSource URL: {{ $json.original_url }}\n\n【Writing Requirements】\n- Topic: {{ $json.topic }}\n- Keywords: {{ $json.keywords }}\n- Target length: {{ $json.target_length }}\n- Tone: {{ $json.tone }}\n\n【Article Structure】\nPlease create the article with the following structure:\n\n# Compelling Title (specific and engaging)\n\n## Introduction (200 words)\n- Background of this news\n- Why it matters\n\n## Detailed Analysis\n### Point 1: Overview\n- What happened\n\n### Point 2: Impact\n- What are the implications\n\n### Point 3: Future Outlook\n- What's next\n\n## Summary (150 words)\n- Key takeaways\n\n---\nMeta Description (120 characters max)",
        "options": {
          "systemMessage": "You are a professional content writer who creates valuable, detailed articles based on news sources."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "a553796b-fbc8-40a5-8183-a464cd7beb6c",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        736,
        496
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "ad35b96a-db22-4ee9-805a-a9934a651060",
      "name": "创建Google文档",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1696,
        272
      ],
      "parameters": {
        "title": "={{ $('Format RSS Data').item.json.original_title }}",
        "driveId": "=",
        "folderId": "="
      },
      "typeVersion": 2
    },
    {
      "id": "47080e37-1411-4c11-a2da-1ae9d39cbaac",
      "name": "添加文章内容",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1920,
        272
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $('Structure Article Data').item.json.article_body }}",
              "action": "insert"
            },
            {
              "text": "=\\n\\n---\\n【Article Information】\\nSource: {{ $('Structure Article Data').item.json.original_url }}\\nOriginal Title: {{ $('Structure Article Data').item.json.original_title }}\\nReviewer: {{ $('Request Human Review').item.json.reviewer_name }}\\nApproval Date: {{ $now.toLocaleString('en-US') }}\\nWord Count: {{ $('Structure Article Data').item.json.word_count }} words",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $json.id }}"
      },
      "typeVersion": 2
    },
    {
      "id": "c2010b96-cc13-4347-b2cb-2ca2d9acb4bd",
      "name": "文章已发布",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2448,
        272
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d2995df2-e9aa-499d-accf-63fc84c9757e",
      "name": "文章被拒绝",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1696,
        464
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "096749ba-d451-4e52-a32c-db1c15b27e58",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        64,
        288
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1bd48d89-2933-4af7-bdaf-99b7a240ca17",
      "name": "RSS 读取",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        272,
        288
      ],
      "parameters": {
        "url": "https://example.com/rss-feed.xml",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "781ba339-0ab9-45f1-891f-613f5102cbbf",
      "name": "结构化文章数据",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        288
      ],
      "parameters": {
        "jsCode": "// Structure AI-generated article with metadata\nconst aiOutput = $input.item.json.output || $input.item.json.text || '';\nconst inputData = $input.item.json;\n\n// Extract title (first # line)\nconst titleMatch = aiOutput.match(/^#\\s+(.+)$/m);\nconst title = titleMatch ? titleMatch[1] : inputData.original_title;\n\n// Extract meta description\nconst metaMatch = aiOutput.match(/---\\s*\\n([\\s\\S]+)$/);\nconst metaDescription = metaMatch ? metaMatch[1].trim() : '';\n\n// Article body (excluding meta description)\nconst articleBody = metaDescription ? aiOutput.replace(/---\\s*\\n[\\s\\S]+$/, '').trim() : aiOutput;\n\nreturn {\n  json: {\n    topic: inputData.topic,\n    keywords: inputData.keywords,\n    keywords_array: inputData.keywords_array,\n    target_length: inputData.target_length,\n    tone: inputData.tone,\n    title: title,\n    article_body: articleBody,\n    meta_description: metaDescription,\n    word_count: articleBody.replace(/[#\\s]/g, '').length,\n    original_url: inputData.original_url,\n    original_title: inputData.original_title,\n    pub_date: inputData.pub_date,\n    created_at: new Date().toISOString()\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "75f63a4a-250a-4066-a615-16c70a3ca1f4",
      "name": "请求人工审核",
      "type": "@gotohuman/n8n-nodes-gotohuman.gotoHuman",
      "position": [
        1232,
        288
      ],
      "webhookId": "rss-blog-template",
      "parameters": {
        "fields": {
          "value": {
            "topic": "={{ $json.topic }}",
            "keywords": "={{ $json.keywords }}",
            "word_count": "={{ $json.word_count }}",
            "article_body": "={{ $json.article_body }}",
            "original_url": "{{ $json.original_url }}",
            "article_title": "={{ $json.title }}",
            "meta_description": "={{ $json.meta_description }}"
          },
          "schema": [
            {
              "id": "topic",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "topic (text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "keywords",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "keywords (text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "article_title (text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_body",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "article_body (longText)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "meta_description",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "meta_description (text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "word_count",
              "type": "number",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "word_count (number)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "original_url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "original_url (text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "assignments": [
            {
              "id": "topic",
              "value": "={{ $json.topic }}"
            },
            {
              "id": "keywords",
              "value": "={{ $json.keywords }}"
            },
            {
              "id": "article_title",
              "value": "={{ $json.title }}"
            },
            {
              "id": "article_body",
              "value": "={{ $json.article_body }}"
            },
            {
              "id": "meta_description",
              "value": "={{ $json.meta_description }}"
            },
            {
              "id": "word_count",
              "value": "={{ $json.word_count }}"
            },
            {
              "id": "original_url",
              "value": "={{ $json.original_url }}"
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "additionalFields": {},
        "reviewTemplateID": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOTOHUMAN_TEMPLATE_ID",
          "cachedResultName": "Article Review Template"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4c680e9e-6405-4505-8db7-73a66480b594",
      "name": "检查审核状态",
      "type": "n8n-nodes-base.if",
      "position": [
        1456,
        288
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "condition-approval-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.response }}",
              "rightValue": "approved"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "149e2699-ff1f-40a0-873c-b4f9e26416fc",
      "name": "发送 Slack 通知",
      "type": "n8n-nodes-base.slack",
      "position": [
        2128,
        272
      ],
      "webhookId": "rss-blog-template-slack",
      "parameters": {
        "text": "=✅ New blog article published from RSS feed!\n📝 Title: {{ $('Structure Article Data').item.json.title }}\n📊 Word Count: {{ $('Structure Article Data').item.json.word_count }} words\n🎯 Keywords: {{ $('Structure Article Data').item.json.keywords || 'Technology, News' }}\n👤 Reviewer: {{ $('Request Human Review').item.json.respondingUser || 'Team' }}\n📅 Approval Date: {{ $now.toLocaleString('en-US') }}\n🌐 *Source URL:* {{ $('Structure Article Data').item.json.original_url || 'https://example.com' }}\n💬 Meta Description:\n{{ $('Structure Article Data').item.json.meta_description }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SLACK_CHANNEL_ID",
          "cachedResultName": "Your Slack Channel"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c81976c3-4fda-4118-8efb-043d941627f8",
  "connections": {
    "RSS Read": {
      "main": [
        [
          {
            "node": "Format RSS Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format RSS Data": {
      "main": [
        [
          {
            "node": "Generate Article with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "RSS Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Google Doc": {
      "main": [
        [
          {
            "node": "Add Article Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Article with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Add Article Content": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Human Review": {
      "main": [
        [
          {
            "node": "Check Approval Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Approval Status": {
      "main": [
        [
          {
            "node": "Create Google Doc",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Article Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structure Article Data": {
      "main": [
        [
          {
            "node": "Request Human Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Notification": {
      "main": [
        [
          {
            "node": "Article Published",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Article with AI": {
      "main": [
        [
          {
            "node": "Structure Article Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流