8
n8n 中文网amn8n.com

追踪网站流量数据

中级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, FormTrigger, HttpRequest, GoogleSheets 等节点。 使用 SEMrush API 和 Google Sheets 追踪网站流量数据

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752"
  },
  "nodes": [
    {
      "id": "c1f80a80-22bd-460a-b519-821eac8d8163",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        640,
        220
      ],
      "webhookId": "5dc2478f-05eb-4c1e-9c2c-d88ddb6976bf",
      "parameters": {
        "options": {},
        "formTitle": "Website Traffic Checker",
        "formFields": {
          "values": [
            {
              "fieldLabel": "website",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Website Traffic Checker"
      },
      "typeVersion": 2.2
    },
    {
      "id": "21719ba3-293a-46f8-9b5b-b768fae7961f",
      "name": "重新格式化",
      "type": "n8n-nodes-base.code",
      "position": [
        1160,
        220
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data.semrushAPI.trafficSummary;"
      },
      "typeVersion": 2
    },
    {
      "id": "0c8e4440-4788-4a57-b412-8eba19b4b99f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        40
      ],
      "parameters": {
        "width": 740,
        "height": 820,
        "content": "**带有 Google Sheets 集成的自动化网站流量检查器**"
      },
      "typeVersion": 1
    },
    {
      "id": "98be917f-b2b1-4ac2-9f49-fbe10f8ac235",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        40
      ],
      "parameters": {
        "height": 340,
        "content": "表单提交时"
      },
      "typeVersion": 1
    },
    {
      "id": "44763ea2-f711-4a7e-b0ad-3bb41e8e336e",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        40
      ],
      "parameters": {
        "height": 340,
        "content": "网站流量检查器"
      },
      "typeVersion": 1
    },
    {
      "id": "b9cbd421-e2c8-4065-b5f1-a1e295ffb8ae",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        40
      ],
      "parameters": {
        "height": 340,
        "content": "重新格式化"
      },
      "typeVersion": 1
    },
    {
      "id": "4ab092f2-b823-47c2-9d71-19c58385be19",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        40
      ],
      "parameters": {
        "height": 340,
        "content": "在 Google Sheets 中追加数据"
      },
      "typeVersion": 1
    },
    {
      "id": "e8f072af-bb51-418b-ba3a-f4acfbfd2690",
      "name": "网站流量检查器",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        220
      ],
      "parameters": {
        "url": "https://semrush-website-traffic-checker.p.rapidapi.com/webtraffic.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": "semrush-website-traffic-checker.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e41d0762-84c1-48bf-b690-4617b5b0805a",
      "name": "在 Google Sheets 中追加数据",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1400,
        220
      ],
      "parameters": {
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Rt0RWApx8PL9t0RF",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "pinData": {},
  "connections": {
    "Reformat": {
      "main": [
        [
          {
            "node": "Append Data In Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "website traffic checker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "website traffic checker": {
      "main": [
        [
          {
            "node": "Reformat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 杂项, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流