使用Google趋势、新闻、Firecrawl和Claude AI的自动化内容策略
高级
这是一个Market Research, Multimodal AI领域的自动化工作流,包含 22 个节点。主要使用 Set, Code, Aggregate, SerpApi, GoogleSheets 等节点。 使用Google趋势、新闻、Firecrawl和Claude AI的自动化内容策略
前置要求
- •Google Sheets API 凭证
- •Anthropic API Key
使用的节点 (22)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "393ca9e36a1f81b0f643c72792946a5fe5e49eb4864181ba4032e5a408278263",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "1c6e3667-2a2b-43be-ba3e-9b94db926e54",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1072,
208
],
"parameters": {
"jsonSchemaExample": "{\n\t\"query1\": [\"query\", \"évolution\"],\n \"query2\": [\"query\", \"évolution\"],\n \"query3\": [\"query\", \"évolution\"]\n}"
},
"typeVersion": 1.3
},
{
"id": "a6c8f655-2052-4791-b9ba-57e6a3a48397",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
208,
0
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "566c1440-e01d-4721-baf2-faf9ed110f98",
"name": "Anthropic 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
880,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude Sonnet 4"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"id": "WXQf5QsxCs3AyxlW",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "7214cc02-1302-413a-9c90-811dfa916302",
"name": "## 如何实施此 n8n 工作流",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2048,
0
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "93b8e495-f6e7-445d-a41f-e8cfd4a2c8ff",
"name": "循环处理项目2",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2656,
0
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "2a0d938c-e799-403f-ac8b-e9f847823a5b",
"name": "Anthropic聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
3136,
496
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude 4 Sonnet"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"id": "WXQf5QsxCs3AyxlW",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "cef2ba4d-426d-447a-b905-4ad324bf7002",
"name": "搜索趋势",
"type": "n8n-nodes-serpapi.serpApi",
"position": [
480,
0
],
"parameters": {
"q": "={{ $json.Query }}",
"operation": "google_trends",
"requestOptions": {},
"additionalFields": {
"hl": "fr",
"geo": "FR",
"date": "today 1-m",
"data_type": "RELATED_QUERIES"
}
},
"credentials": {
"serpApi": {
"id": "w1oDmQzMKE4Wcj2P",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "435c4eb8-6225-4566-af04-6baf8f6743a7",
"name": "创建 Google Sheets 表格",
"type": "n8n-nodes-base.googleSheets",
"position": [
1584,
0
],
"parameters": {
"title": "={{ new Date(new Date().setMonth(new Date().getMonth() - 1)).toLocaleDateString('fr-FR', { month: 'long' }).charAt(0).toUpperCase() + new Date(new Date().setMonth(new Date().getMonth() - 1)).toLocaleDateString('fr-FR', { month: 'long' }).slice(1) }} {{ $('Loop Over Items').item.json.Query }}",
"options": {},
"operation": "create",
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/1z7iP_i98PT9BQuUypAi0c3NHkdhREEPJWkDjyj8Snfw"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wBRLUCktxqXE6DVJ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "e85b3aed-3e1d-4ca1-a515-38e576341ed2",
"name": "搜索 GNews",
"type": "n8n-nodes-serpapi.serpApi",
"position": [
2304,
0
],
"parameters": {
"q": "={{ $json.Query }}",
"operation": "google_news",
"requestOptions": {},
"additionalFields": {
"gl": "fr",
"hl": "fr"
}
},
"credentials": {
"serpApi": {
"id": "w1oDmQzMKE4Wcj2P",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "c6f64302-5e32-4aea-aebf-0be722ce2865",
"name": "仅返回 URL",
"type": "n8n-nodes-base.code",
"position": [
2480,
0
],
"parameters": {
"jsCode": "// Récupérer les données d'entrée\nconst inputData = $input.all()[0].json;\n\n// Extraire les résultats de news\nconst newsResults = inputData.news_results || [];\n\n// Trier par position (ordre croissant)\nconst sortedResults = newsResults.sort((a, b) => a.position - b.position);\n\n// Prendre les 3 premiers résultats et extraire seulement l'URL\nconst top3Results = sortedResults.slice(0, 3).map(result => ({\n link: result.link\n}));\n\n// Retourner les 3 premiers résultats\nreturn top3Results.map(item => ({ json: item }));"
},
"typeVersion": 2
},
{
"id": "e8deaa80-c2e0-4d71-9c81-d47becaee6fd",
"name": "抓取文章",
"type": "@mendable/n8n-nodes-firecrawl.firecrawl",
"position": [
2912,
0
],
"parameters": {
"url": "={{ $json.link }}",
"operation": "scrape",
"requestOptions": {}
},
"credentials": {
"firecrawlApi": {
"id": "E34WDB80ik5VHjiI",
"name": "Firecrawl account"
}
},
"typeVersion": 1
},
{
"id": "979755ba-7d54-4240-aca7-a9febea049d7",
"name": "计划触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-224,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 8 1 * *"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "05229024-42ae-4f30-bd46-e614abc649af",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1696,
-768
],
"parameters": {
"color": 4,
"width": 776,
"height": 2292,
"content": "# 内容策略的自动化趋势监控"
},
"typeVersion": 1
},
{
"id": "8a61dc73-4805-434a-85b9-8088f25bb28d",
"name": "获取查询",
"type": "n8n-nodes-base.googleSheets",
"position": [
-16,
0
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Query"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1z7iP_i98PT9BQuUypAi0c3NHkdhREEPJWkDjyj8Snfw"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wBRLUCktxqXE6DVJ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "5a61f1ba-682d-4ce9-9ab5-25b6278c6fd5",
"name": "分类查询",
"type": "n8n-nodes-base.code",
"position": [
688,
0
],
"parameters": {
"jsCode": "// N8N Code Node - Create Nested Structure for Related Queries\n// This code creates a nested structure: Topic -> related queries\n// Get the input data (assuming it's the first item)\nconst inputData = $input.all()[0].json;\n// Initialize arrays to store extracted data\nlet relatedQueries = [];\nlet risingQueries = [];\ntry {\n // Check if the response contains related_queries data\n if (inputData.related_queries) {\n \n // Extract \"top\" related queries if they exist\n if (inputData.related_queries.top) {\n relatedQueries = \n inputData.related_queries.top.map((query, index) => ({\n query: query.query,\n value: query.value,\n extracted_value: query.extracted_value,\n link: query.link,\n serpapi_link: query.serpapi_link,\n type: 'top',\n rank: index + 1\n }));\n }\n \n // Extract \"rising\" related queries if they exist\n if (inputData.related_queries.rising) {\n risingQueries = \n inputData.related_queries.rising.map((query, index) => ({\n query: query.query,\n value: query.value,\n extracted_value: query.extracted_value,\n link: query.link,\n serpapi_link: query.serpapi_link,\n type: 'rising',\n rank: index + 1\n }));\n }\n }\n \n // Combine all queries with their types\n const allQueries = [...relatedQueries, ...risingQueries];\n \n // Sort by extracted_value (descending) to get top performers\n const sortedQueries = allQueries.sort((a, b) => {\n const aVal = typeof a.extracted_value === 'number' ? a.extracted_value : 0;\n const bVal = typeof b.extracted_value === 'number' ? b.extracted_value : 0;\n return bVal - aVal;\n });\n \n // Get top 10 queries\n const top10Queries = sortedQueries.slice(0, 10);\n \n // Return only top 10 queries\n return [\n {\n json: {\n topic: inputData.search_parameters?.q || 'Unknown',\n top_10_queries: top10Queries\n }\n }\n ];\n \n} catch (error) {\n // Handle errors gracefully\n return [\n {\n json: {\n error: 'Failed to extract and structure related queries data',\n error_message: error.message,\n topic: inputData.search_parameters?.q || 'Unknown'\n }\n }\n ];\n}"
},
"typeVersion": 2
},
{
"id": "8b337af3-c190-4113-82aa-ce8fe9abbc12",
"name": "排序查询",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
912,
0
],
"parameters": {
"text": "=Votre tâche est de sélectionner lister les requêtes qui correspond étroitement au créneau de \"{{ $('Loop Over Items').item.json.Query }}\" mais elle ne doit pas être géolocalisée, par exemple \"{{ $('Loop Over Items').item.json.Query }} Paris\" car nous ne voulons pas de sujets liés à la localisation.\n\nPour chaque requête indique son évolution en pourcentage (sans le +).\n\n{{ JSON.stringify($json.top_10_queries, null, 2) }}\n\n",
"batching": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "28bf3218-140a-4eae-9758-5ac06574964a",
"name": "排序输出 > 表格",
"type": "n8n-nodes-base.code",
"position": [
1280,
0
],
"parameters": {
"jsCode": "// Récupérer les données d'entrée\nconst inputData = $input.all()[0].json.output;\n\n// Initialiser le tableau de sortie\nlet restructuredData = [];\n\n// Parcourir chaque query dans l'objet\nObject.keys(inputData).forEach(key => {\n const queryData = inputData[key];\n \n restructuredData.push({\n Query: queryData[0], // Le nom de la requête\n Évolution: queryData[1], // Le pourcentage d'évolution\n News: \"\", // Colonne vide pour l'instant\n Idée: \"\" // Colonne vide pour l'instant\n }); \n});\n\n// Retourner le tableau restructuré\nreturn restructuredData.map(item => ({ json: item }));"
},
"typeVersion": 2
},
{
"id": "a2002422-28b1-4c58-b3a0-850cd6a63591",
"name": "添加数据",
"type": "n8n-nodes-base.googleSheets",
"position": [
1584,
176
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ new Date(new Date().setMonth(new Date().getMonth() - 1)).toLocaleDateString('fr-FR', { month: 'long' }).charAt(0).toUpperCase() + new Date(new Date().setMonth(new Date().getMonth() - 1)).toLocaleDateString('fr-FR', { month: 'long' }).slice(1) }} {{ $('Loop Over Items').item.json.Query }}"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/1z7iP_i98PT9BQuUypAi0c3NHkdhREEPJWkDjyj8Snfw"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wBRLUCktxqXE6DVJ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "c1134ef9-865b-4cf4-aa96-a14121f10fe0",
"name": "筛选查询",
"type": "n8n-nodes-base.set",
"position": [
1824,
0
],
"parameters": {
"include": "selected",
"options": {},
"assignments": {
"assignments": [
{
"id": "245bf100-21a3-4de2-9b92-74e09e3347a7",
"name": "Query",
"type": "string",
"value": "={{ $json.Query }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "e51a3336-4a8a-407e-9529-37658bf74132",
"name": "编译数据",
"type": "n8n-nodes-base.aggregate",
"position": [
2928,
288
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "e7aa0bac-7576-4d55-b0be-411cb7c60b7f",
"name": "文章分析",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
3184,
288
],
"parameters": {
"text": "=Source 1\n\n{{ $json.data[0].data.markdown }}\n\nSource 2 \n\n{{ $json.data[1].data.markdown }}\n\nSource 3\n\n{{ $json.data[2].data.markdown }}\n",
"batching": {},
"messages": {
"messageValues": [
{
"message": "=Voilà le contenu de 3 article sur le thème \"{{ $('Loop Over Items').item.json.Query }}\", peux tu les analyser en en déduire 3 idée d'article de blog SEO avec à chaque fois une proposition de mot clé associé.\n\nExemple : \nThème de l'article 1, proposition de mot clé 1\nThème de l'article 2, proposition de mot clé 2\nThème de l'article 3, proposition de mot clé 3\n\nNe fais pas d'introduction ou de conclusion à ta réponse répond simplement à la requête"
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "c3918ddb-f7e6-4021-8c0d-71f36e5ae5ff",
"name": "添加文章数据",
"type": "n8n-nodes-base.googleSheets",
"position": [
3552,
288
],
"parameters": {
"columns": {
"value": {
"News": "={{ $('Search GNews').item.json.news_results[0].link }}\n{{ $('Search GNews').item.json.news_results[1].link }}\n{{ $('Search GNews').item.json.news_results[2].link }}",
"Idée": "={{ $json.text }}",
"Query": "={{ $('Loop Over Items1').item.json.Query }}"
},
"schema": [
{
"id": "Query",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Query",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Évolution",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Évolution",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "News",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "News",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Idée",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Idée",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Query"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ new Date(new Date().setMonth(new Date().getMonth() - 1)).toLocaleDateString('fr-FR', { month: 'long' }).charAt(0).toUpperCase() + new Date(new Date().setMonth(new Date().getMonth() - 1)).toLocaleDateString('fr-FR', { month: 'long' }).slice(1) }} {{ $('Loop Over Items').item.json.Query }}"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/1z7iP_i98PT9BQuUypAi0c3NHkdhREEPJWkDjyj8Snfw"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wBRLUCktxqXE6DVJ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
}
],
"pinData": {},
"connections": {
"Add datas": {
"main": [
[
{
"node": "Filter queries",
"type": "main",
"index": 0
}
]
]
},
"Get Query": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Search GNews": {
"main": [
[
{
"node": "Return URL only",
"type": "main",
"index": 0
}
]
]
},
"Search trend": {
"main": [
[
{
"node": "Classing query",
"type": "main",
"index": 0
}
]
]
},
"Compile datas": {
"main": [
[
{
"node": "Article analysis",
"type": "main",
"index": 0
}
]
]
},
"Classing query": {
"main": [
[
{
"node": "Sorting queries",
"type": "main",
"index": 0
}
]
]
},
"Filter queries": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Search trend",
"type": "main",
"index": 0
}
]
]
},
"Return URL only": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Scrape articles": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Sorting queries": {
"main": [
[
{
"node": "Sorting output > table",
"type": "main",
"index": 0
}
]
]
},
"Article analysis": {
"main": [
[
{
"node": "Add article datas",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "Search GNews",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items2": {
"main": [
[
{
"node": "Compile datas",
"type": "main",
"index": 0
}
],
[
{
"node": "Scrape articles",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get Query",
"type": "main",
"index": 0
}
]
]
},
"Add article datas": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Anthropic Chat Model": {
"ai_languageModel": [
[
{
"node": "Sorting queries",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Anthropic Chat Model1": {
"ai_languageModel": [
[
{
"node": "Article analysis",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Sorting output > table": {
"main": [
[
{
"node": "Création feuille sheets",
"type": "main",
"index": 0
},
{
"node": "Add datas",
"type": "main",
"index": 0
}
]
]
},
"Création feuille sheets": {
"main": [
[]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Sorting queries",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 市场调研, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
自动化新闻监控与Claude 4 AI分析,用于Discord和Google新闻
自动化新闻监控与Claude 4 AI分析,用于Discord和Google新闻
Code
Discord
Aggregate
+8
30 节点Growth AI
杂项
YouTube评论情感和关键词提取器
使用Gemini AI分析YouTube评论情感和关键词并通过Telegram报告
Set
Code
Telegram
+10
20 节点Budi SJ
市场调研
使用Claude AI和竞品分析的SEO内容生成器
使用Claude AI和Apify竞品分析生成SEO内容
If
Code
Filter
+9
36 节点Growth AI
内容创作
使用Claude AI、竞品分析和Supabase RAG的SEO内容生成器
使用Claude AI、竞品分析和Supabase RAG生成SEO内容
If
Code
Filter
+11
40 节点Growth AI
内容创作
从产品图片生成 UGC 视频(Gemini 和 VEO3)
使用 Gemini 和 VEO3 从产品图片生成 UGC 视频
Set
Code
Wait
+12
32 节点Growth AI
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作