8
n8n 中文网amn8n.com

使用RapidAPI和Google Sheets自动化SEO关键词分析

中级

这是一个Market Research, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, FormTrigger, HttpRequest, GoogleSheets 等节点。 使用RapidAPI和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": "Keyword  Analysis ",
        "formFields": {
          "values": [
            {
              "fieldLabel": "country",
              "requiredField": true
            },
            {
              "fieldLabel": "keyword",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Keyword  Analysis "
      },
      "typeVersion": 2.2
    },
    {
      "id": "00963262-4328-4998-a996-b12d98f1badb",
      "name": "重新格式化输出",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        0
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data.semrushAPI.broadMatchKeywords;"
      },
      "typeVersion": 2
    },
    {
      "id": "47be20f6-5340-4d42-af21-bff7faf046ec",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        840,
        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": "keywordsSerpFeatures",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "keywordsSerpFeatures",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "numberOfResults",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "numberOfResults",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "searchVolume",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "searchVolume",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "trends",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "trends",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "keywordDifficultyIndex",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "keywordDifficultyIndex",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "intent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "intent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 150500408,
          "cachedResultUrl": "",
          "cachedResultName": "keyword"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Seo n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Rt0RWApx8PL9t0RF",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "2ec4b6b3-d8e0-4afd-8230-05604e85a258",
      "name": "关键词分析",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        300,
        0
      ],
      "parameters": {
        "url": "https://keyword-research-tool3.p.rapidapi.com/keyword-tool.php",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "country",
              "value": "={{ $json.country }}"
            },
            {
              "name": "keyword",
              "value": "={{ $json.keyword }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "keyword-research-tool3.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "eaa1c076-3d65-41a6-934f-b7114f86de70",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -520
      ],
      "parameters": {
        "width": 640,
        "height": 980,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "fca5eb74-cc39-45b0-82c1-efc8d00c2df6",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -260
      ],
      "parameters": {
        "height": 420,
        "content": "**表单提交时(触发器)**"
      },
      "typeVersion": 1
    },
    {
      "id": "e3a571a3-3fd8-478c-8b98-24ac8338a36e",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -260
      ],
      "parameters": {
        "height": 420,
        "content": "**关键词分析(HTTP 请求)**"
      },
      "typeVersion": 1
    },
    {
      "id": "83e2f234-03c1-40f7-b696-15bf9ff371ef",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -260
      ],
      "parameters": {
        "height": 420,
        "content": "**重新格式化输出(代码)**"
      },
      "typeVersion": 1
    },
    {
      "id": "beee2895-71ef-4ce4-9e2f-8e9fd847f101",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -260
      ],
      "parameters": {
        "height": 420,
        "content": "**Google Sheets(追加)**"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Keyword Analysis": {
      "main": [
        [
          {
            "node": "Re format output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Re format output": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Keyword Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流