将Search Console结果导出到Google Sheets
高级
这是一个Marketing领域的自动化工作流,包含 18 个节点。主要使用 Set, SplitOut, HttpRequest, GoogleSheets, ScheduleTrigger 等节点。 将Search Console结果导出到Google Sheets
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"nodes": [
{
"id": "8e3f167d-cbeb-4f7f-a867-c356d2dca9d0",
"name": "分离",
"type": "n8n-nodes-base.splitOut",
"position": [
1580,
240
],
"parameters": {
"options": {},
"fieldToSplitOut": "rows"
},
"typeVersion": 1
},
{
"id": "19370d12-f6de-44a1-91a6-da097abdf7de",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
1780,
240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7343c80f-37f3-4bb5-84d8-9f21f8a350cd",
"name": "Keyword",
"type": "string",
"value": "={{ $json.keys[0] }}"
},
{
"id": "436e7c8b-2df2-40a9-97af-597dc00cf143",
"name": "clicks",
"type": "number",
"value": "={{ $json.clicks }}"
},
{
"id": "5b4aaffe-391a-4c9d-8249-f447397a3f5d",
"name": "impressions",
"type": "number",
"value": "={{ $json.impressions }}"
},
{
"id": "33677237-57fe-48f4-aff8-72ae81b5f5a2",
"name": "ctr",
"type": "number",
"value": "={{ $json.ctr }}"
},
{
"id": "f961deee-d222-4df7-a7ff-b7286405e4a7",
"name": "position",
"type": "number",
"value": "={{ $json.position }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9eae4908-5266-439c-a66b-5679036234de",
"name": "分离1",
"type": "n8n-nodes-base.splitOut",
"position": [
1580,
440
],
"parameters": {
"options": {},
"fieldToSplitOut": "rows"
},
"typeVersion": 1
},
{
"id": "b05926b1-507f-4531-a05c-a15e835ee82e",
"name": "编辑字段1",
"type": "n8n-nodes-base.set",
"position": [
1780,
440
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7343c80f-37f3-4bb5-84d8-9f21f8a350cd",
"name": "page",
"type": "string",
"value": "={{ $json.keys[0] }}"
},
{
"id": "436e7c8b-2df2-40a9-97af-597dc00cf143",
"name": "clicks",
"type": "number",
"value": "={{ $json.clicks }}"
},
{
"id": "5b4aaffe-391a-4c9d-8249-f447397a3f5d",
"name": "impressions",
"type": "number",
"value": "={{ $json.impressions }}"
},
{
"id": "33677237-57fe-48f4-aff8-72ae81b5f5a2",
"name": "ctr",
"type": "number",
"value": "={{ $json.ctr }}"
},
{
"id": "f961deee-d222-4df7-a7ff-b7286405e4a7",
"name": "position",
"type": "number",
"value": "={{ $json.position }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "42321587-2565-4a0a-9d9d-25cbfdeb9f49",
"name": "拆分输出2",
"type": "n8n-nodes-base.splitOut",
"position": [
1580,
620
],
"parameters": {
"options": {},
"fieldToSplitOut": "rows"
},
"typeVersion": 1
},
{
"id": "9e25eef9-daa4-47dd-b2cf-03cfebadb5c6",
"name": "编辑字段2",
"type": "n8n-nodes-base.set",
"position": [
1780,
620
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7343c80f-37f3-4bb5-84d8-9f21f8a350cd",
"name": "date",
"type": "string",
"value": "={{ $json.keys[0] }}"
},
{
"id": "436e7c8b-2df2-40a9-97af-597dc00cf143",
"name": "clicks",
"type": "number",
"value": "={{ $json.clicks }}"
},
{
"id": "5b4aaffe-391a-4c9d-8249-f447397a3f5d",
"name": "impressions",
"type": "number",
"value": "={{ $json.impressions }}"
},
{
"id": "33677237-57fe-48f4-aff8-72ae81b5f5a2",
"name": "ctr",
"type": "number",
"value": "={{ $json.ctr }}"
},
{
"id": "f961deee-d222-4df7-a7ff-b7286405e4a7",
"name": "position",
"type": "number",
"value": "={{ $json.position }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e8f1ab65-9594-45e7-ba9e-7873bd53a107",
"name": "日期",
"type": "n8n-nodes-base.httpRequest",
"position": [
1360,
620
],
"parameters": {
"url": "=https://www.googleapis.com/webmasters/v3/sites/sc-domain:{{$json.domain}}/searchAnalytics/query",
"method": "POST",
"options": {},
"jsonBody": "={\n \"startDate\": \"{{ $now.format('yyyy-MM-dd') }}\",\n \"endDate\": \"{{ $now.minus($json.days, 'days').format('yyyy-MM-dd') }}\",\n \"dimensions\": [\"date\"]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api"
},
"credentials": {
"googleApi": {
"id": "9vSHyulYjxYMr8MK",
"name": "Service Account✅"
},
"httpHeaderAuth": {
"id": "Ng5SZdTqwe74l2KO",
"name": "Header Auth account ⚠️"
},
"googleOAuth2Api": {
"id": "wuKNLprxCMuetOYN",
"name": "Google account✅3"
}
},
"typeVersion": 4.2
},
{
"id": "d3bbf719-9524-4269-8c26-0eb7599add55",
"name": "计划触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
700,
460
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "69cf781d-7ff5-4e2d-ad7d-505a5143710a",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
1220,
160
],
"parameters": {
"color": 4,
"width": 1033,
"height": 660,
"content": "确保您的表名与实际知识库结构匹配"
},
"typeVersion": 1
},
{
"id": "b701bc62-07e7-4494-a674-560846783a29",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
100
],
"parameters": {
"color": 4,
"width": 645,
"height": 828,
"content": ""
},
"typeVersion": 1
},
{
"id": "07432897-f068-4371-9f88-d70340e2082a",
"name": "便签17",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
100
],
"parameters": {
"color": 4,
"width": 503.60808870324274,
"height": 80,
"content": "# Search Console 报告"
},
"typeVersion": 1
},
{
"id": "092645b2-9e75-4ff0-8d33-4a3acadac789",
"name": "设置您的域名",
"type": "n8n-nodes-base.set",
"position": [
980,
460
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "6f74dee0-3789-433e-b60e-ed2a05202675",
"name": "domain",
"type": "string",
"value": "funautomations.io"
},
{
"id": "8c73135e-9d39-4f66-821d-7decb3c64085",
"name": "days",
"type": "number",
"value": 30
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0b04b552-e484-417b-9a7e-a90d477dd45a",
"name": "获取查询报告",
"type": "n8n-nodes-base.httpRequest",
"position": [
1360,
240
],
"parameters": {
"url": "=https://www.googleapis.com/webmasters/v3/sites/sc-domain:{{$json.domain}}/searchAnalytics/query",
"method": "POST",
"options": {},
"jsonBody": "={\n \"startDate\": \"{{ $now.format('yyyy-MM-dd') }}\",\n \"endDate\": \"{{ $now.minus($json.days, 'days').format('yyyy-MM-dd') }}\",\n \"dimensions\": [\"query\"]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api"
},
"credentials": {
"httpHeaderAuth": {
"id": "Ng5SZdTqwe74l2KO",
"name": "Header Auth account ⚠️"
},
"googleOAuth2Api": {
"id": "SlPOQ6j86r5XbnxV",
"name": "Oath account ✅5"
}
},
"typeVersion": 4.2
},
{
"id": "9f9f2be7-1301-4c91-8da1-86eab5725683",
"name": "获取页面报告",
"type": "n8n-nodes-base.httpRequest",
"position": [
1360,
440
],
"parameters": {
"url": "=https://www.googleapis.com/webmasters/v3/sites/sc-domain:{{$json.domain}}/searchAnalytics/query",
"method": "POST",
"options": {},
"jsonBody": "={\n \"startDate\": \"{{ $now.format('yyyy-MM-dd') }}\",\n \"endDate\": \"{{ $now.minus($json.days, 'days').format('yyyy-MM-dd') }}\",\n \"dimensions\": [\"page\"]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleOAuth2Api"
},
"credentials": {
"httpHeaderAuth": {
"id": "Ng5SZdTqwe74l2KO",
"name": "Header Auth account ⚠️"
},
"googleOAuth2Api": {
"id": "wuKNLprxCMuetOYN",
"name": "Google account✅3"
}
},
"typeVersion": 4.2
},
{
"id": "737f802f-4629-41f2-9b21-4a98e92d6433",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
380
],
"parameters": {
"color": 4,
"width": 300,
"height": 300,
"content": "## 设置域名和天数频率"
},
"typeVersion": 1
},
{
"id": "f8f62dde-1529-4d3a-a030-aa952496652d",
"name": "更新查询到表格",
"type": "n8n-nodes-base.googleSheets",
"position": [
1980,
240
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "Keyword",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Keyword",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "clicks",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "clicks",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "impressions",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "impressions",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ctr",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ctr",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "position",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "position",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [
"Keyword"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 996986484,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10hSuGOOf14YvVY2Bw8WXUIpsyXO614l7qNEjkyVY_Qg/edit#gid=996986484",
"cachedResultName": "Query"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/10hSuGOOf14YvVY2Bw8WXUIpsyXO614l7qNEjkyVY_Qg/edit?usp=sharing"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ZAI2a6Qt80kX5a9s",
"name": "Google Sheets account✅ "
}
},
"typeVersion": 4.5
},
{
"id": "299c4fa9-fb7e-4c85-a8a5-3cea53ba7136",
"name": "更新页面到表格",
"type": "n8n-nodes-base.googleSheets",
"position": [
2000,
440
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "page",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "page",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "clicks",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "clicks",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "impressions",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "impressions",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ctr",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ctr",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "position",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "position",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [
"page"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10hSuGOOf14YvVY2Bw8WXUIpsyXO614l7qNEjkyVY_Qg/edit#gid=0",
"cachedResultName": "PAGES"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/10hSuGOOf14YvVY2Bw8WXUIpsyXO614l7qNEjkyVY_Qg/edit?usp=sharing"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ZAI2a6Qt80kX5a9s",
"name": "Google Sheets account✅ "
}
},
"typeVersion": 4.5
},
{
"id": "4cc4197a-7ee5-4cd8-ade7-80bca911a3cf",
"name": "更新日期报告到表格",
"type": "n8n-nodes-base.googleSheets",
"position": [
2000,
620
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "clicks",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "clicks",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "impressions",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "impressions",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ctr",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ctr",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "position",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "position",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [
"date"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1823079319,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10hSuGOOf14YvVY2Bw8WXUIpsyXO614l7qNEjkyVY_Qg/edit#gid=1823079319",
"cachedResultName": "Dates"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/10hSuGOOf14YvVY2Bw8WXUIpsyXO614l7qNEjkyVY_Qg/edit?usp=sharing"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ZAI2a6Qt80kX5a9s",
"name": "Google Sheets account✅ "
}
},
"retryOnFail": true,
"typeVersion": 4.5
}
],
"pinData": {},
"connections": {
"date": {
"main": [
[
{
"node": "Split Out2",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Split Out1": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Split Out2": {
"main": [
[
{
"node": "Edit Fields2",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Update queries to Sheets",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "Update Pages to Sheets ",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields2": {
"main": [
[
{
"node": "Update date report to sheets",
"type": "main",
"index": 0
}
]
]
},
"Get Page Report": {
"main": [
[
{
"node": "Split Out1",
"type": "main",
"index": 0
}
]
]
},
"Set your domain": {
"main": [
[
{
"node": "Get query Report",
"type": "main",
"index": 0
},
{
"node": "Get Page Report",
"type": "main",
"index": 0
},
{
"node": "date",
"type": "main",
"index": 0
}
]
]
},
"Get query Report": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Set your domain",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 营销
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Bright Data监控和追踪Facebook群组品牌情感
使用Bright Data监控和追踪Facebook群组中的品牌情感
Set
Wait
Limit
+13
37 节点Imperol
人工智能
生成带搜索量的新关键词 ⚒️⚒️🟢🟢
使用 Google Ads API 生成新关键词及其搜索量
Set
Split Out
Http Request
+3
11 节点Imperol
营销
Apple WWDC25 Reddit情感分析与Gemini AI和Google表格
Apple WWDC25 Reddit情感分析与Gemini AI和Google表格
Set
Wait
Merge
+11
28 节点Imperol
人工智能
股市每日摘要
使用 Bright Data 爬取和 Gemini AI 邮件报告的股市每日摘要
Set
Wait
Switch
+9
22 节点Imperol
人工智能
从网站HTML中提取电子邮件
从网站HTML中提取电子邮件
If
Set
Webhook
+5
10 节点Imperol
销售
使用 Google 自动建议生成关键词
使用 Google 自动建议生成关键词
Set
Xml
Webhook
+5
9 节点Imperol
营销
工作流信息
难度等级
高级
节点数量18
分类1
节点类型6
作者
Imperol
@imperolqAutomation expert with years of experience helping businesses improve their efficiency and productivity with smart automations that are affordable, scalable, and flexible.
外部链接
在 n8n.io 查看 →
分享此工作流