使用Semrush API和Google Sheets进行SEO竞争对手分析与数据记录
高级
这是一个Market Research, Multimodal AI领域的自动化工作流,包含 21 个节点。主要使用 Code, FormTrigger, HttpRequest, GoogleSheets 等节点。 使用Semrush API和Google Sheets进行SEO竞争对手分析与数据记录
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "55979fca-6abb-43f2-af9a-59f2cacaeb51",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
0,
0
],
"webhookId": "259a4fed-36fb-457c-8813-f84cf10d8c36",
"parameters": {
"options": {},
"formTitle": "Competitor Analysis ",
"formFields": {
"values": [
{
"fieldLabel": "website",
"requiredField": true
}
]
},
"formDescription": "Competitor Analysis "
},
"typeVersion": 2.2
},
{
"id": "00963262-4328-4998-a996-b12d98f1badb",
"name": "重新格式化输出",
"type": "n8n-nodes-base.code",
"position": [
560,
0
],
"parameters": {
"jsCode": "return $input.first().json.data.semrushAPI.domainOverview"
},
"typeVersion": 2
},
{
"id": "493ee398-972d-4a0b-b4ee-407ce2eeffc0",
"name": "重新格式化",
"type": "n8n-nodes-base.code",
"position": [
720,
420
],
"parameters": {
"jsCode": "return $input.first().json.data.semrushAPI.organicCompetitors;"
},
"typeVersion": 2
},
{
"id": "2ec4b6b3-d8e0-4afd-8230-05604e85a258",
"name": "竞争对手分析",
"type": "n8n-nodes-base.httpRequest",
"position": [
300,
0
],
"parameters": {
"url": "https://competitor-analysis-semrush.p.rapidapi.com/competitor.php",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "website",
"value": "={{ $json.website }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "competitor-analysis-semrush.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "47be20f6-5340-4d42-af21-bff7faf046ec",
"name": "域名概览",
"type": "n8n-nodes-base.googleSheets",
"position": [
800,
0
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "database",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "database",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "organicKeywords",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "organicKeywords",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "organicTraffic",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "organicTraffic",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1271965358,
"cachedResultUrl": "",
"cachedResultName": "domainOverview"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": "Seo n8n"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "Rt0RWApx8PL9t0RF",
"name": "Google Docs account"
}
},
"typeVersion": 4.6
},
{
"id": "2273488d-2ac3-404a-8708-cc032fe3be62",
"name": "自然搜索竞争对手",
"type": "n8n-nodes-base.googleSheets",
"position": [
1160,
320
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "adwordsKeywords",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "adwordsKeywords",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "commonKeywords",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "commonKeywords",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "competitorRelevance",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "competitorRelevance",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "domain",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "domain",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "organicCost",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "organicCost",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "organicKeywords",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "organicKeywords",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "organicTraffic",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "organicTraffic",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1979882207,
"cachedResultUrl": "",
"cachedResultName": "organicCompetitors"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": "Seo n8n"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "Rt0RWApx8PL9t0RF",
"name": "Google Docs account"
}
},
"typeVersion": 4.6
},
{
"id": "955fce75-4e3e-4360-b82e-d9ab6c1e2c2b",
"name": "重新格式化2",
"type": "n8n-nodes-base.code",
"position": [
380,
700
],
"parameters": {
"jsCode": "return $input.first().json.data.semrushAPI.organicPages;"
},
"typeVersion": 2
},
{
"id": "3e7e7efb-ea5f-4254-8efc-8ac886bb371c",
"name": "自然搜索页面",
"type": "n8n-nodes-base.googleSheets",
"position": [
1020,
700
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "trafficPercent",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "trafficPercent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "traffic",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "traffic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "numberOfKeywords",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "numberOfKeywords",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1802882998,
"cachedResultUrl": "",
"cachedResultName": "organicPages"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": "Seo n8n"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "Rt0RWApx8PL9t0RF",
"name": "Google Docs account"
}
},
"typeVersion": 4.6
},
{
"id": "00f9c804-fa53-4549-afff-d21f7d61ed06",
"name": "重新格式化2",
"type": "n8n-nodes-base.code",
"position": [
640,
960
],
"parameters": {
"jsCode": "return $input.first().json.data.semrushAPI.domainOrganicSearchKeywords;"
},
"typeVersion": 2
},
{
"id": "b8327558-3253-4175-b354-247f861cc4b8",
"name": "自然搜索关键词",
"type": "n8n-nodes-base.googleSheets",
"position": [
920,
1000
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "competition",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "competition",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "cpc",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "cpc",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "keyword",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "keyword",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "numberOfResults",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "numberOfResults",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "position",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "position",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "positionDifference",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "positionDifference",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "previousPosition",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "previousPosition",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "searchVolume",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "searchVolume",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "trafficPercent",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "trafficPercent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "trafficCostPercent",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "trafficCostPercent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "trends",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "trends",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "keywordDifficulty",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "keywordDifficulty",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 185010398,
"cachedResultUrl": "",
"cachedResultName": "domainOrganicSearchKeywords"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": "Seo n8n"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "Rt0RWApx8PL9t0RF",
"name": "Google Docs account"
}
},
"typeVersion": 4.6
},
{
"id": "d2e9d70f-e407-4d2d-89bc-599307a1127e",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1100,
40
],
"parameters": {
"width": 900,
"height": 1120,
"content": "# 标题:"
},
"typeVersion": 1
},
{
"id": "392030b3-6fad-4413-806c-d681cc0a77f9",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
-160
],
"parameters": {
"height": 400,
"content": "**表单提交时**"
},
"typeVersion": 1
},
{
"id": "6b374b63-4273-4884-ac5d-ea06dfa2917f",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
-160
],
"parameters": {
"height": 400,
"content": "**竞争对手分析**"
},
"typeVersion": 1
},
{
"id": "e5b7a624-e183-4083-a29b-7df9d9a5352e",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
500,
-160
],
"parameters": {
"height": 400,
"content": "**重新格式化输出**"
},
"typeVersion": 1
},
{
"id": "088dfba6-8113-456b-821c-8097e9b052ec",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
300
],
"parameters": {
"height": 280,
"content": "**重新格式化**"
},
"typeVersion": 1
},
{
"id": "096424cc-ae1d-4ef1-a6f4-ac6d453f5c9d",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
760,
-160
],
"parameters": {
"height": 400,
"content": "**域名概览**"
},
"typeVersion": 1
},
{
"id": "d3a217ec-3b03-4558-bbc7-65a033886a71",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
120
],
"parameters": {
"height": 400,
"content": "**自然搜索竞争对手**"
},
"typeVersion": 1
},
{
"id": "5be1e49a-cee1-4b24-950d-2e031f8d4ff4",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
560
],
"parameters": {
"height": 280,
"content": "**重新格式化 2**"
},
"typeVersion": 1
},
{
"id": "3d0146eb-b7db-416c-955e-250c2ec8edb1",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
980,
580
],
"parameters": {
"height": 260,
"content": "**自然搜索页面**"
},
"typeVersion": 1
},
{
"id": "f6548868-48ac-4d87-ac98-fa18edf20c5f",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
840
],
"parameters": {
"height": 280,
"content": "**重新格式化2**"
},
"typeVersion": 1
},
{
"id": "1afa168f-b854-41a8-a150-6782ab94e259",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
860
],
"parameters": {
"height": 260,
"content": "**自然搜索关键词**"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Reformat": {
"main": [
[
{
"node": "Organic Competitor",
"type": "main",
"index": 0
}
]
]
},
"Reformat2": {
"main": [
[
{
"node": "organic keywords",
"type": "main",
"index": 0
}
]
]
},
"Reformat 2": {
"main": [
[
{
"node": "Organic Pages",
"type": "main",
"index": 0
}
]
]
},
"Re format output": {
"main": [
[
{
"node": "Domain overview",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Competitor Analysis ",
"type": "main",
"index": 0
}
]
]
},
"Competitor Analysis ": {
"main": [
[
{
"node": "Re format output",
"type": "main",
"index": 0
},
{
"node": "Reformat",
"type": "main",
"index": 0
},
{
"node": "Reformat 2",
"type": "main",
"index": 0
},
{
"node": "Reformat2",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 市场调研, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用顶级反向链接检查器API分析网站反向链接并记录到Google Sheets
使用顶级反向链接检查器API分析网站反向链接并记录到Google Sheets
Code
Form Trigger
Http Request
+2
13 节点Sk developer
市场调研
使用RapidAPI和Google Sheets自动化SEO关键词分析
使用RapidAPI和Google Sheets自动化SEO关键词分析
Code
Form Trigger
Http Request
+2
9 节点Sk developer
市场调研
批量检查域名权威指标并记录到Google表格
使用RapidAPI批量检查域名权威指标并记录到Google表格
Code
Form Trigger
Http Request
+2
9 节点Sk developer
市场调研
使用 RapidAPI 从 Indeed、LinkedIn 等平台抓取职位并保存到 Google Sheets
使用 RapidAPI 从 Indeed、LinkedIn 等平台抓取职位并保存到 Google Sheets
Code
Form Trigger
Http Request
+2
9 节点Sk developer
市场调研
追踪网站 SEO 指标
使用 Moz API 和 Google Sheets 集成追踪网站 SEO 指标
If
Code
Form Trigger
+3
11 节点Sk developer
市场调研
追踪网站流量
使用 Semrush API 追踪网站流量,并将结果记录至 Google Sheets
Code
Form Trigger
Http Request
+2
9 节点Sk developer
市场调研