使用 ScrapegraphAI 自动抓取新闻文章并存储到 Google Sheets
中级
这是一个Market Research, AI Summarization领域的自动化工作流,包含 8 个节点。主要使用 Code, GoogleSheets, ScheduleTrigger, ScrapegraphAi 等节点。 使用ScrapegraphAI自动抓取新闻文章并存储到Google Sheets
前置要求
- •Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "MIllJmbqayQrZM1F",
"meta": {
"instanceId": "521567c5f495f323b77849c4cfd0c9f4f2396c986e324e0e66c8425b6f124744",
"templateCredsSetupCompleted": true
},
"name": "使用 ScrapegraphAI 自动抓取新闻文章并存储到 Google Sheets",
"tags": [],
"nodes": [
{
"id": "37df323b-5c75-495f-ba19-b8642c02d96f",
"name": "自动化新闻收集触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
700,
820
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "efd61ca5-e248-4027-b705-6d9c5dabe820",
"name": "AI 驱动的新闻文章抓取器",
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
"position": [
1380,
820
],
"parameters": {
"userPrompt": "Extract all the articles from this site. Use the following schema for response { \"request_id\": \"5a9de102-8a43-4e89-8aae-397c9ca80a9b\", \"status\": \"completed\", \"website_url\": \"https://www.bbc.com/\", \"user_prompt\": \"Extract all the articles from this site.\", \"title\": \"'My friend died right in front of me' - Student describes moment air force jet crashed into school\", \"url\": \"https://www.bbc.com/news/articles/cglzw8y5wy5o\", \"category\": \"Asia\" }",
"websiteUrl": "https://www.bbc.com/"
},
"credentials": {
"scrapegraphAIApi": {
"id": "",
"name": ""
}
},
"typeVersion": 1
},
{
"id": "976d9123-7585-4700-9972-5b2838571a44",
"name": "Google Sheets 新闻存储",
"type": "n8n-nodes-base.googleSheets",
"position": [
2980,
820
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "category",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "category",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": []
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": ""
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "",
"name": ""
}
},
"typeVersion": 4.5
},
{
"id": "6d11ae64-e2f8-47ed-854a-c749881ce72c",
"name": "新闻数据格式化与处理",
"type": "n8n-nodes-base.code",
"notes": "Hey this is where \nyou \nformat results ",
"position": [
2140,
820
],
"parameters": {
"jsCode": "// Get the input data\nconst inputData = $input.all()[0].json;\n\n// Extract articles array\nconst articles = inputData.result.articles;\n\n// Map each article and return only title, url, category\nreturn articles.map(article => ({\n json: {\n title: article.title,\n url: article.url,\n category: article.category\n }\n}));"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "ca78baaf-0480-490d-aa9a-3663ca93f5d0",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1180,
460
],
"parameters": {
"color": 5,
"width": 574.9363634768473,
"height": 530.4701664623029,
"content": "# 步骤 2:AI 驱动的新闻文章抓取器 🤖"
},
"typeVersion": 1
},
{
"id": "51a1337b-6a50-43a5-8d6f-8345bc771c7b",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1920,
460
],
"parameters": {
"color": 5,
"width": 574.9363634768473,
"height": 530.4701664623029,
"content": "# 步骤 3:新闻数据格式化与处理 🧱"
},
"typeVersion": 1
},
{
"id": "2e8cde8e-f534-4f37-a1f9-bcf0fe0b09f9",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
460
],
"parameters": {
"color": 5,
"width": 574.9363634768473,
"height": 530.4701664623029,
"content": "# 步骤 1:自动化新闻收集触发器 ⏱️"
},
"typeVersion": 1
},
{
"id": "5606537c-a531-490a-b4ff-6d0dc5e642b4",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
2680,
460
],
"parameters": {
"color": 5,
"width": 574.9363634768473,
"height": 530.4701664623029,
"content": "# 步骤 4:Google Sheets 新闻存储 📊"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "c2fee060-f99e-48aa-a280-ac5492715fd9",
"connections": {
"AI-Powered News Article Scraper": {
"main": [
[
{
"node": "News Data Formatting and Processing",
"type": "main",
"index": 0
}
]
]
},
"Automated News Collection Trigger": {
"main": [
[
{
"node": "AI-Powered News Article Scraper",
"type": "main",
"index": 0
}
]
]
},
"News Data Formatting and Processing": {
"main": [
[
{
"node": "Google Sheets News Storage",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 市场调研, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
我的工作流程 2
AI驱动内容差距分析,使用ScrapeGraphAI和战略规划
Code
Google Sheets
Schedule Trigger
+2
18 节点vinci-king-01
市场调研
我的工作流 2
结合 AI 竞品监控和收入优化的自动化动态定价
If
Code
Merge
+8
25 节点vinci-king-01
市场调研
我的工作流2
使用ScrapeGraphAI和Google Sheets发现和分析SEO反向链接
Code
Filter
Email Send
+4
17 节点vinci-king-01
市场调研
我的工作流程2
使用AI、Slack和Google Sheets监控社交媒体内容趋势
Code
Merge
Slack
+5
17 节点vinci-king-01
市场调研
竞品价格监控
带AI组件和警报的价格监控仪表板
If
Code
Slack
+6
15 节点vinci-king-01
市场调研
Amazon 键盘产品智能抓取与 Google Sheets 集成
使用 ScrapeGraphAI 抓取 Amazon 键盘产品到 Google Sheets
Code
Google Sheets
Schedule Trigger
+2
8 节点vinci-king-01
市场调研