8
n8n 中文网amn8n.com

分析竞争对手反向链接

高级

这是一个Market Research, AI Summarization领域的自动化工作流,包含 16 个节点。主要使用 Set, Code, GoogleSheets, McpClientTool, ManualTrigger 等节点。 使用Bright Data MCP和GPT提取和分析竞争对手反向链接数据

前置要求
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "kJ6CKf3JPavFZYvM",
  "meta": {
    "instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480",
    "templateCredsSetupCompleted": true
  },
  "name": "20 分析竞争对手反向链接",
  "tags": [],
  "nodes": [
    {
      "id": "ee9b60aa-0808-4720-be3a-059b3361100c",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        280
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8sEyPDkC5p4w4Jha",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dbcf5e5e-c02c-4324-83df-5fc76727d1af",
      "name": "MCP 客户端",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        660,
        280
      ],
      "parameters": {
        "toolName": "scrape_as_markdown",
        "operation": "executeTool",
        "toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
      },
      "credentials": {
        "mcpClientApi": {
          "id": "eqq94k789oJCd6jU",
          "name": "MCP Client (STDIO) account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0bdbf6bb-746a-4865-8ca5-d0cd5486e0d1",
      "name": "触发器:手动执行",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2ed6588f-489e-4057-8b3b-f9f19ffa0b86",
      "name": "设置:竞争对手域名",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "910cdf0d-ed9b-426f-a00e-b0f7c41dc29a",
              "name": "url",
              "type": "string",
              "value": "https://ahrefs.com/"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b750cb56-d2db-496c-b7ec-53b355049d4d",
      "name": "代理:抓取反向链接(Bright Data MCP)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        520,
        0
      ],
      "parameters": {
        "text": "=extract any backlinks available from the following url:\n{{ $json.url }}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "69860787-3f93-472a-8395-c43c24f6cf02",
      "name": "函数:拆分反向链接",
      "type": "n8n-nodes-base.code",
      "position": [
        1000,
        0
      ],
      "parameters": {
        "jsCode": "// This Function node takes input like your provided JSON\n// and returns each backlink as a separate item\n\n// 1️⃣ Get the input\nconst input = items[0].json.output;\n\n// 2️⃣ Extract backlinks array\nconst backlinks = input.backlinks;\n\n// 3️⃣ Build output items\nconst output = backlinks.map(backlink => {\n  return {\n    json: {\n      domain: input.domain,\n      title: backlink.title,\n      url: backlink.url,\n      category: backlink.category,\n      date: backlink.date\n    }\n  };\n});\n\n// 4️⃣ Return array of individual items\nreturn output;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "cfecaa49-3d11-47ec-a18c-cc26b1e52e99",
      "name": "Google Sheets:追加反向链接",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1200,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $json.url }}",
            "date": "={{ $json.date }}",
            "title": "={{ $json.title }}",
            "domain": "={{ $json.domain }}",
            "category": "={{ $json.category }}"
          },
          "schema": [
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/11_bI1ZmRuroowdXLaQ9OKM11vnaJ134NcE_tLh7S3jw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "11_bI1ZmRuroowdXLaQ9OKM11vnaJ134NcE_tLh7S3jw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/11_bI1ZmRuroowdXLaQ9OKM11vnaJ134NcE_tLh7S3jw/edit?usp=drivesdk",
          "cachedResultName": "Backlinks"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "r2mDaisH6e9VkwHl",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "33dc3004-5875-4a33-a330-df2b0e3e0ad7",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -1240
      ],
      "parameters": {
        "color": 6,
        "width": 380,
        "height": 1440,
        "content": "## ✅ **🔵 第一部分:输入与触发器**"
      },
      "typeVersion": 1
    },
    {
      "id": "5ad521f9-c227-4e44-a796-68ec79d7e243",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -1900
      ],
      "parameters": {
        "color": 3,
        "width": 380,
        "height": 2100,
        "content": "## ✅ **🤖 第二部分:代理抓取引擎**"
      },
      "typeVersion": 1
    },
    {
      "id": "522c5056-4e30-418b-abc7-2fe6925a058a",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -860
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 1060,
        "content": "## ✅ **🟢 第三部分:转换与存储**"
      },
      "typeVersion": 1
    },
    {
      "id": "4f58284e-3415-4be4-beb3-09736c824369",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        -860
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## 如果您通过此链接加入 Bright Data,我将获得一小笔佣金 — 感谢您支持更多免费内容!"
      },
      "typeVersion": 1
    },
    {
      "id": "eea0c5ec-6e85-41c7-8724-983811834d0f",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -1240
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "5fc4b876-acf6-47b4-8fee-857ff4c0b1ec",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -900
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 3898,
        "content": "## 🎯 **🔗 竞争对手反向链接提取工作流**"
      },
      "typeVersion": 1
    },
    {
      "id": "e1d427ca-b97d-4026-a550-507e31b10370",
      "name": "自动修复输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        800,
        280
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "ece54ff0-7010-4547-b73f-dc59660767c1",
      "name": "OpenAI 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        760,
        520
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8sEyPDkC5p4w4Jha",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ad2d763e-decd-49ce-a226-267808c93470",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        940,
        500
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"domain\": \"https://ahrefs.com/\",\n  \"backlinks\": [\n    {\n      \"title\": \"Ahrefs Certification: What To Expect and How It Works\",\n      \"url\": \"https://ahrefs.com/blog/ahrefs-certification/\",\n      \"category\": \"Blog\",\n      \"date\": \"March 2025\"\n    },\n    {\n      \"title\": \"Ahrefs Blog\",\n      \"url\": \"https://ahrefs.com/blog/\",\n      \"category\": \"Learn Marketing\"\n    },\n    {\n      \"title\": \"Ahrefs Academy\",\n      \"url\": \"https://academy.ahrefs.com\",\n      \"category\": \"Learn Marketing\"\n    },\n    {\n      \"title\": \"Ahrefs Podcast\",\n      \"url\": \"https://www.youtube.com/c/AhrefsCom\",\n      \"category\": \"Learn Marketing\"\n    },\n    {\n      \"title\": \"Ahrefs YouTube Channel\",\n      \"url\": \"https://www.youtube.com/c/AhrefsCom\",\n      \"category\": \"Learn Marketing\"\n    },\n    {\n      \"title\": \"Help Center\",\n      \"url\": \"https://help.ahrefs.com\",\n      \"category\": \"Resources\"\n    },\n    {\n      \"title\": \"Ahrefs Data\",\n      \"url\": \"https://ahrefs.com/big-data\",\n      \"category\": \"Resources\"\n    },\n    {\n      \"title\": \"Agency Directory\",\n      \"url\": \"https://www.ahrefs.com/agencies\",\n      \"category\": \"User Testimonials and Community\"\n    },\n    {\n      \"title\": \"About Ahrefs\",\n      \"url\": \"https://ahrefs.com/about\",\n      \"category\": \"Company Information\"\n    },\n    {\n      \"title\": \"Jobs at Ahrefs\",\n      \"url\": \"https://ahrefs.com/jobs\",\n      \"category\": \"Company Information\"\n    },\n    {\n      \"title\": \"Twitter\",\n      \"url\": \"https://x.com/ahrefs\",\n      \"category\": \"Social Media\"\n    },\n    {\n      \"title\": \"YouTube\",\n      \"url\": \"https://www.youtube.com/c/AhrefsCom\",\n      \"category\": \"Social Media\"\n    },\n    {\n      \"title\": \"Instagram\",\n      \"url\": \"https://www.instagram.com/ahrefs\",\n      \"category\": \"Social Media\"\n    },\n    {\n      \"title\": \"Facebook\",\n      \"url\": \"https://www.facebook.com/Ahrefs\",\n      \"category\": \"Social Media\"\n    },\n    {\n      \"title\": \"LinkedIn\",\n      \"url\": \"https://www.linkedin.com\",\n      \"category\": \"Social Media\"\n    }\n  ]\n}\n"
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "16dc3c18-f761-4b99-a44c-8d189ad97893",
  "connections": {
    "MCP Client": {
      "ai_tool": [
        [
          {
            "node": "Agent: Scrape Backlinks (Bright Data MCP)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agent: Scrape Backlinks (Bright Data MCP)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set: Competitor Domain": {
      "main": [
        [
          {
            "node": "Agent: Scrape Backlinks (Bright Data MCP)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger: Manual Execute": {
      "main": [
        [
          {
            "node": "Set: Competitor Domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Agent: Scrape Backlinks (Bright Data MCP)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Function: Split Backlinks": {
      "main": [
        [
          {
            "node": "Google Sheets: Append Backlinks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent: Scrape Backlinks (Bright Data MCP)": {
      "main": [
        [
          {
            "node": "Function: Split Backlinks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 市场调研, AI 摘要总结

需要付费吗?

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

工作流信息
难度等级
高级
节点数量16
分类2
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Yaron Been

Yaron Been

@yaron-nofluff

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

外部链接
在 n8n.io 查看

分享此工作流