8
n8n 中文网amn8n.com

使用RapidAPI和Google Sheets报告分析竞争对手关键词

中级

这是一个Market Research, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, FormTrigger, HttpRequest, GoogleSheets 等节点。 使用RapidAPI和Google Sheets报告分析竞争对手关键词

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "6df0fc87-64cd-4ed2-8c13-94a26e54f0f4",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "webhookId": "62964f32-f17c-4b83-9836-a1736de829fd",
      "parameters": {
        "options": {},
        "formTitle": "Competitor Keyword Analysis",
        "formFields": {
          "values": [
            {
              "fieldLabel": "website",
              "requiredField": true
            },
            {
              "fieldLabel": "country",
              "placeholder": "in",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Competitor Keyword Analysis"
      },
      "typeVersion": 2.2
    },
    {
      "id": "1a919bd5-3046-4e85-abda-603cd9e46a1a",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        800,
        0
      ],
      "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": "keywordDifficulty",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "keywordDifficulty",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Rt0RWApx8PL9t0RF",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e66cb1b0-82db-4c3e-9d88-7c8d3d164822",
      "name": "竞争对手关键词分析",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        0
      ],
      "parameters": {
        "url": "https://competitor-keyword-analysis.p.rapidapi.com/web-keyoword-tool.php",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "website",
              "value": "={{ $json.website }}"
            },
            {
              "name": "country",
              "value": "={{ $json.country }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "competitor-keyword-analysis.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "53499d16-8b32-49ce-97e5-96260568234a",
      "name": "重新格式化代码",
      "type": "n8n-nodes-base.code",
      "position": [
        540,
        0
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data.semrushAPI.domainOrganicSearchKeywords;"
      },
      "typeVersion": 2
    },
    {
      "id": "d3f84fa1-a176-442c-a761-6c1c1f446362",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -200
      ],
      "parameters": {
        "height": 400,
        "content": "**📝 表单提交时 (`formTrigger`)**"
      },
      "typeVersion": 1
    },
    {
      "id": "28e57f59-de22-4202-93ff-1e016a959fb5",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        -400
      ],
      "parameters": {
        "width": 1000,
        "height": 1160,
        "content": "# 🔍 竞争对手关键词分析与报告工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "ab39b34c-4e33-4325-9641-1e9221936eed",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -200
      ],
      "parameters": {
        "height": 400,
        "content": "**🌐 竞争对手关键词分析 (`httpRequest`)**"
      },
      "typeVersion": 1
    },
    {
      "id": "3b80d196-f33a-4df3-ab7c-e0a78cae876d",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -200
      ],
      "parameters": {
        "height": 400,
        "content": "**🔄 重新格式化代码 (`code`)**"
      },
      "typeVersion": 1
    },
    {
      "id": "d6127aac-de48-4427-8881-4d493c61b156",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -200
      ],
      "parameters": {
        "height": 400,
        "content": "**📊 Google Sheets (`googleSheets`)**"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Reformat Code": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Competitor Keyword Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Competitor Keyword Analysis": {
      "main": [
        [
          {
            "node": "Reformat Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 市场调研, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流