8
n8n 中文网amn8n.com

使用GPT-4、Google搜索API和Slack自动化新闻发现与发布

中级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 Code, Slack, HttpRequest, GoogleSheets, Agent 等节点。 使用GPT-4、Google搜索API和Slack自动化新闻发现与发布

前置要求
  • Slack Bot Token 或 Webhook URL
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "58d60dd9256bdb5987eb9f9ae86bf49505ac31ccad75aec6db9c9d448b351af0"
  },
  "nodes": [
    {
      "id": "15fe5e33-4d9f-4bc9-9e72-ac1af36c3fe8",
      "name": "📋 设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 390.1693164217126,
        "height": 464.5206143079691,
        "content": "## 📊 Google Sheets 设置说明"
      },
      "typeVersion": 1
    },
    {
      "id": "b3073aba-2403-4ec3-9f30-0aa1fa864c5b",
      "name": "准备发布数据1",
      "type": "n8n-nodes-base.code",
      "position": [
        2448,
        704
      ],
      "parameters": {
        "jsCode": "const response = $input.item.json;\nlet articleData;\n\ntry {\n  let content = response.message?.content || '';\n  \n  // Clean up JSON extraction\n  if (content.includes('```json')) {\n    const start = content.indexOf('```json') + 7;\n    const end = content.lastIndexOf('```');\n    content = content.substring(start, end).trim();\n  }\n  \n  // Handle incomplete JSON\n  if (!content.trim().endsWith('}')) {\n    const lastQuote = content.lastIndexOf('\"');\n    if (lastQuote > 0) {\n      content = content.substring(0, lastQuote + 1) + '}';\n    }\n  }\n  \n  articleData = JSON.parse(content);\n  \n} catch (e) {\n  console.log('JSON parse failed:', e.message);\n  \n  // Fallback extraction\n  const raw = response.message?.content || '';\n  articleData = {\n    title: (raw.match(/\"title\"\\s*:\\s*\"([^\"]*)\"/)?.[1]) || \"Industry Update\",\n    metaDescription: (raw.match(/\"metaDescription\"\\s*:\\s*\"([^\"]*)\"/)?.[1]) || \"Latest industry news\",\n    content: (raw.match(/\"content\"\\s*:\\s*\"([^\"]*)\"/s)?.[1]) || \"Content extraction failed\",\n    focusKeyphrase: \"ai automation\",\n    readingTime: 8,\n    seoScore: 90,\n    wordCount: 2500\n  };\n}\n\n// MINIMAL formatting since GPT should output correctly\nlet formattedContent = (articleData.content || \"\")\n  // Fix escaped characters\n  .replace(/\\\\\"/g, '\"')\n  .replace(/\\\\n\\\\n/g, '\\n\\n')\n  .replace(/\\\\n/g, '\\n')\n  \n  // Just clean up any remaining spacing issues\n  .replace(/\\n{3,}/g, '\\n\\n')\n  .replace(/^\\n+|\\n+$/g, '')\n  .trim();\n\n// Calculate actual word count\nconst wordCount = formattedContent.split(/\\s+/).filter(word => word.length > 0).length;\n\nreturn [{\n  article: {\n    title: articleData.title,\n    metaDescription: articleData.metaDescription,\n    content: formattedContent,\n    focusKeyphrase: articleData.focusKeyphrase || \"ai automation\",\n    readingTime: Math.ceil(wordCount / 250) || 8,\n    seoScore: articleData.seoScore || 90,\n    wordCount: wordCount\n  },\n  publishing: {\n    slug: (articleData.title || \"article\")\n      .toLowerCase()\n      .replace(/[^a-z0-9]+/g, '-')\n      .replace(/^-+|-+$/g, '')\n      .substring(0, 60),\n    featured: true,\n    publishedAt: new Date().toISOString()\n  },\n  seo: {\n    keyword: articleData.focusKeyphrase || \"ai automation\",\n    intent: \"informational\",\n    difficulty: 5,\n    volume: \"5000/mo\",\n    contentAngle: \"industry analysis\"\n  },\n  metadata: {\n    category: \"AI & Technology\",\n    originalUrl: \"\",\n    originalSource: \"Generated\",\n    sources: [],\n    tags: [\"ai\", \"enterprise\", \"automation\", \"technology\"]\n  },\n  image: {\n    url: \"https://source.unsplash.com/1200x630/?technology,artificial-intelligence\",\n    alt: articleData.title || \"Technology\"\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "25c9e154-5434-47b0-a274-e498767d6e90",
      "name": "发布到 CMS1",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2672,
        704
      ],
      "parameters": {
        "url": "webhook_url",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n \"title\": {{ JSON.stringify($json.article.title) }},\n \"slug\": {{ JSON.stringify($json.publishing.slug) }},\n \"meta_description\": {{ JSON.stringify($json.article.metaDescription) }},\n \"body_markdown\": {{ JSON.stringify($json.article.content) }},\n \"focus_keyphrase\": {{ JSON.stringify($json.article.focusKeyphrase) }},\n \"reading_time\": {{ JSON.stringify(String($json.article.readingTime)) }},\n \"seo_score\": {{ JSON.stringify(String($json.article.seoScore)) }},\n \"word_count\": {{ JSON.stringify(String($json.article.wordCount)) }},\n \"keyword\": {{ JSON.stringify($json.seo.keyword) }},\n \"intent\": {{ JSON.stringify($json.seo.intent) }},\n \"difficulty\": {{ JSON.stringify(String($json.seo.difficulty)) }},\n \"volume\": {{ JSON.stringify($json.seo.volume) }},\n \"content_angle\": {{ JSON.stringify($json.seo.contentAngle) }},\n \"category\": {{ JSON.stringify($json.metadata.category) }},\n \"featured\": {{ $json.publishing.featured }},\n \"author\": \"Lexi\",\n \"publish_date\": {{ JSON.stringify($json.publishing.publishedAt) }},\n \"sources\": {{ JSON.stringify($json.metadata.sources) }},\n \"original_url\": {{ JSON.stringify($json.metadata.originalUrl) }},\n \"news_type\": {{ JSON.stringify($json.seo.intent) }},\n \"tags\": {{ JSON.stringify($json.metadata.tags) }},\n \"image_url\": {{ JSON.stringify($json.image.url) }},\n \"image_caption\": {{ JSON.stringify($json.image.alt) }},\n \"image_credit\": \"Unsplash\",\n \"cta_label\": \"Subscribe for Updates\",\n \"cta_url\": \"https://kalyxi.ai/#contact\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "d52e2366-3a77-47d6-91cc-334ead72f289",
      "name": "每日计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        848,
        704
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "92c9457e-5dd2-4177-9ea0-29156543be78",
      "name": "搜索最近文章",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1424,
        704
      ],
      "parameters": {
        "url": "https://www.googleapis.com/customsearch/v1",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "key",
              "value": "google_api_key"
            },
            {
              "name": "cx",
              "value": "custom_search_id"
            },
            {
              "name": "q",
              "value": "={{ $json.output }}"
            },
            {
              "name": "dateRestrict",
              "value": "d7"
            },
            {
              "name": "num",
              "value": "5"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c223a640-db05-4b7d-a4f2-b2344d9693b4",
      "name": "提取最佳文章",
      "type": "n8n-nodes-base.code",
      "position": [
        1648,
        704
      ],
      "parameters": {
        "jsCode": "// Parse search results and extract the best article\nconst searchResults = $input.item.json;\nlet articles = [];\n\n// Handle Google Custom Search API response\nif (searchResults.items && Array.isArray(searchResults.items)) {\n searchResults.items.forEach(item => {\n   const urlParts = item.link.match(/^https?:\\/\\/([^\\/]+)/);\n   const hostname = urlParts ? urlParts[1] : 'unknown';\n   \n   articles.push({\n     title: item.title,\n     url: item.link,\n     snippet: item.snippet,\n     source: hostname,\n     publishDate: new Date().toISOString()\n   });\n });\n}\n\n// Return all articles found\nreturn articles;"
      },
      "typeVersion": 2
    },
    {
      "id": "3eef26f8-8ed4-4dcb-aa4f-256880e19127",
      "name": "生成原创文章",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "onError": "continueRegularOutput",
      "position": [
        2096,
        704
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-turbo-preview"
        },
        "options": {
          "maxTokens": 4096,
          "temperature": 0.7
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an expert content strategist specializing in AI and enterprise automation. Your task is to create a comprehensive, original article based on current industry trends and insights. You must:\n\n1. Write completely original content - never copy or closely paraphrase\n2. Add significant new analysis, insights, and perspectives\n3. Include real-world examples and implementation strategies\n4. Cite sources properly using [1], [2], etc. format\n5. Create SEO-optimized content with natural keyword usage\n6. Focus on practical, actionable insights for enterprise leaders\n7. Maintain a professional, authoritative tone\n8. Structure content with clear sections and subheadings\n9. minimum : 5000 words"
            },
            {
              "content": "=Create a comprehensive news article based on this source material:\n\nTopic:  {{ $json.content }}\nOriginal Title: {{ $json.title }}\nSource: {{ $json.source }}\nContent Preview: {{ $json.content ? $json.content.substring(0, 2000) : $json.snippet }}\nSnippet: {{ $json.snippet }}\n\nWrite a NEWS ARTICLE in the style of Reuters, Bloomberg, or The Wall Street Journal that:\n\nJOURNALISTIC REQUIREMENTS:\n- Lead with the most newsworthy angle in the first paragraph\n- Use inverted pyramid structure (most important info first)\n- Include specific data points, percentages, and dollar amounts\n- Quote industry experts and executives (create realistic quotes)\n- Maintain objective, third-person reporting tone\n- Use present tense for current developments, past tense for context\n- Include company names, market positions, and competitive landscape\n- Add geographical and temporal context\n\nARTICLE STRUCTURE:\n1. HEADLINE: Punchy, specific, newsworthy (60 chars max)\n2. LEDE: Answer who, what, when, where, why in 2-3 sentences\n3. KEY DEVELOPMENTS: 3-4 paragraphs on the main news\n4. MARKET CONTEXT: Industry trends, competitor moves, market size\n5. EXPERT ANALYSIS: 2-3 quoted perspectives from analysts/executives\n6. IMPLICATIONS: What this means for businesses/investors\n7. BACKGROUND: Relevant history and previous developments\n8. OUTLOOK: Future projections and upcoming catalysts\n\nCRITICAL FORMATTING REQUIREMENTS:\n- Use ## for ALL section headers\n- Separate ALL paragraphs with double line breaks (\\n\\n)\n- Never merge text with headers (e.g., NOT \"## Key DevelopmentsThe company...\")\n- Always use: \"## Header\\n\\nParagraph text here\\n\\nNext paragraph\"\n- Include proper quote spacing: \"Quote text,\" said Name, Title.\n\nSTYLE GUIDELINES:\n- Short paragraphs (2-3 sentences max)\n- Active voice\n- Specific rather than general claims\n- Numbers and data in context\n- Avoid jargon without explanation\n- Include source attribution {{ $json.source }}\n\nFormat as VALID JSON:\n{\n  \"title\": \"News headline with specific claim or metric\",\n  \"metaDescription\": \"SEO description with key facts (150-160 chars)\",\n  \"content\": \"## Introduction\\n\\n[Opening paragraph with newsworthy lead]\\n\\n[Context paragraph]\\n\\n## Key Developments\\n\\n[Main developments paragraph]\\n\\n[Quote paragraph with attribution]\\n\\n## Market Context\\n\\n[Industry analysis paragraph]\\n\\n[Competitive landscape paragraph]\\n\\n## Expert Analysis\\n\\n[Expert opinion paragraph]\\n\\n[Additional analysis paragraph]\\n\\n## Implications\\n\\n[Business impact paragraph]\\n\\n## Background\\n\\n[Historical context paragraph]\\n\\n## Outlook\\n\\n[Future projections paragraph]\",\n  \"focusKeyphrase\": \"primary news keyword\",\n  \"sources\": [\"{{ $json.source }}\", \"Additional context sources\"],\n  \"takeaways\": [\"Key fact 1\", \"Key fact 2\", \"Key fact 3\"],\n  \"readingTime\": 8,\n  \"seoScore\": 95,\n  \"wordCount\": 2500\n}\n\nIMPORTANT: \n- Use \\n\\n between ALL paragraphs in the content field\n- Never write \"## Key DevelopmentsThe company\" - always use proper spacing\n- Each section must be clearly separated with headers\n- Content should be 2000-3000 words for comprehensive coverage\n- Include at least 3 realistic quotes from different sources\n- Add specific metrics, percentages, and dollar amounts throughout"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "QA7B68gnhpvpZoob",
          "name": "Kalyxi - OpenAI Account - Project: Digital Content AI Team - Email: support@"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "002c5b6f-35c5-4466-b49f-5a7cb6785eb0",
      "name": "发送 Slack 通知",
      "type": "n8n-nodes-base.slack",
      "onError": "continueRegularOutput",
      "position": [
        3120,
        704
      ],
      "webhookId": "4b559e3f-ee66-48e2-92ae-29b314b46905",
      "parameters": {
        "text": "=*AI-Powered News Content Automation Pipeline*\n\n✅ *New AI Article Published!*\n\n📝 *Title:* {{ $('Publish to CMS1').item.json.article.title }} \n📊 *Metrics:*\\n• \nSEO Score: {{ $('Publish to CMS1').item.json.article.seo_score }}/100 \nWord Count: {{ $('Publish to CMS1').item.json.article.word_count }}  \n \n🎯 *SEO Details:*\nFocus Keyword: {{ $('Prepare Publishing Data1').item.json.seo.keyword }}\\\nSearch Volume: {{ $('Prepare Publishing Data1').item.json.seo.volume }}\\\nDifficulty: {{ $('Prepare Publishing Data1').item.json.seo.difficulty }}/10\n🔗 *Meta:* {{ $('Prepare Publishing Data1').item.json.article.metaDescription }}\n \n👉 *View Article:* {{ $('Publish to CMS1').item.json.article.url }} ",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09CDD3UM3R",
          "cachedResultName": "seo-manager"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "CjOkXK5NYh1BfGCc",
          "name": "Kalyxi Slack Account - Ignacio"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "85a3b60c-a105-48e1-a779-f08273de977f",
      "name": "记录到 Google Sheets2",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        2896,
        704
      ],
      "parameters": {
        "columns": {
          "value": {
            "slug": "={{ $json.article.slug }}",
            "query": "={{ $('Prepare Publishing Data1').item.json.article.focusKeyphrase }}",
            "title": "={{ $json.article.title }}",
            "status": "={{ $json.message }}",
            "featured": "={{ $('Prepare Publishing Data1').item.json.image.url }}",
            "seo_score": "={{ $json.article.seo_score }}",
            "word_count": "={{ $json.article.word_count }}",
            "workflow_id": "={{ $json.article.id }}",
            "published_at": "={{ $json.article.published_date }}"
          },
          "schema": [
            {
              "id": "workflow_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "workflow_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "slug",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "slug",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "query",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "query",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "published_at",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "published_at",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "seo_score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "seo_score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "word_count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "word_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "featured",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "featured",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xS3rd0wSAub5qS9RT7PQhbkoVuxFeKbyNeT9QweC1gw/edit#gid=0",
          "cachedResultName": "ProcessedWorkflows"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1xS3rd0wSAub5qS9RT7PQhbkoVuxFeKbyNeT9QweC1gw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xS3rd0wSAub5qS9RT7PQhbkoVuxFeKbyNeT9QweC1gw/edit?usp=drivesdk",
          "cachedResultName": "n8n Blog Tracker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "nCwr4sPzRb9b7EoR",
          "name": "Kalyxi Support Account - support@kalyxi"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e8d27e02-ea01-470b-8c5d-efc083cdf0ef",
      "name": "AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1072,
        704
      ],
      "parameters": {
        "text": "```\nCheck the Google Sheets processed articles list. Generate ONE unique search query for our AI/automation niche that hasn't been covered yet.\n\nOutput only the search phrase. Nothing else.\n\nExample output:\nedge computing ai manufacturing\n\nRequirements:\n- 3-5 words maximum\n- Must be different from previous searches\n- Stay within AI/enterprise/automation topics\n- No explanations, just the query\n```",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "c3eda3f1-b438-4e85-bf7c-12c6cfad733a",
      "name": "在 Google Sheets 中获取行",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        1216,
        928
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values0_Value', ``, 'string') }}",
              "lookupColumn": "query"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xS3rd0wSAub5qS9RT7PQhbkoVuxFeKbyNeT9QweC1gw/edit#gid=0",
          "cachedResultName": "ProcessedWorkflows"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1xS3rd0wSAub5qS9RT7PQhbkoVuxFeKbyNeT9QweC1gw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xS3rd0wSAub5qS9RT7PQhbkoVuxFeKbyNeT9QweC1gw/edit?usp=drivesdk",
          "cachedResultName": "n8n Blog Tracker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "nCwr4sPzRb9b7EoR",
          "name": "Kalyxi Support Account - support@kalyxi"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "94b5558e-2855-4ce0-8071-0b87f21077da",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1088,
        928
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-turbo-preview",
          "cachedResultName": "gpt-4-turbo-preview"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "HJIzncdtPshQzpyx",
          "name": "Kalyxi - OpenAI Account - Project: Cold Outreach AI Team - Email: support@"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "48895c3d-a820-477f-b16f-52ebd9d44241",
      "name": "🚀 设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        96
      ],
      "parameters": {
        "color": 4,
        "width": 420,
        "height": 868,
        "content": "## 🤖 AI 新闻内容流水线设置"
      },
      "typeVersion": 1
    },
    {
      "id": "8bf87601-073b-4bee-82c7-a861b2d0e511",
      "name": "跳过问题",
      "type": "n8n-nodes-base.code",
      "position": [
        1872,
        704
      ],
      "parameters": {
        "jsCode": "const articles = $input.all();\nconst filteredArticles = [];\n\nfor (const article of articles) {\n  const url = article.json.url || '';\n  \n  // Skip domains known to have strong anti-bot protection\n  const blockedDomains = [\n    'aibusiness.com',\n    'forbes.com', \n    'wsj.com',\n    'ft.com'\n  ];\n  \n  const isBlocked = blockedDomains.some(domain => url.includes(domain));\n  \n  if (!isBlocked) {\n    filteredArticles.push(article.json);\n  }\n}\n\n// If all articles are blocked, use the first one with just the snippet\nif (filteredArticles.length === 0 && articles.length > 0) {\n  const fallback = articles[0].json;\n  fallback.content = fallback.snippet;\n  filteredArticles.push(fallback);\n}\n\nreturn filteredArticles;"
      },
      "typeVersion": 2
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Search Recent Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip problems": {
      "main": [
        [
          {
            "node": "Generate Original Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to CMS1": {
      "main": [
        [
          {
            "node": "Log to Google Sheets2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Best Article": {
      "main": [
        [
          {
            "node": "Skip problems",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Google Sheets2": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Schedule Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Recent Articles": {
      "main": [
        [
          {
            "node": "Extract Best Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Publishing Data1": {
      "main": [
        [
          {
            "node": "Publish to CMS1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Original Article": {
      "main": [
        [
          {
            "node": "Prepare Publishing Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 杂项, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流