This workflow corresponds to n8n.io template #5963 — we link there as the canonical source.
This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "kJ6CKf3JPavFZYvM",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "20 Analyze Competitor Backlinks",
"tags": [],
"nodes": [
{
"id": "ee9b60aa-0808-4720-be3a-059b3361100c",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
480,
280
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "dbcf5e5e-c02c-4324-83df-5fc76727d1af",
"name": "MCP Client",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "0bdbf6bb-746a-4865-8ca5-d0cd5486e0d1",
"name": "Trigger: Manual Execute",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2ed6588f-489e-4057-8b3b-f9f19ffa0b86",
"name": "Set: Competitor Domain",
"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": "Agent: Scrape Backlinks (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": "Function: Split Backlinks",
"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\ufe0f\u20e3 Get the input\nconst input = items[0].json.output;\n\n// 2\ufe0f\u20e3 Extract backlinks array\nconst backlinks = input.backlinks;\n\n// 3\ufe0f\u20e3 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\ufe0f\u20e3 Return array of individual items\nreturn output;\n"
},
"typeVersion": 2
},
{
"id": "cfecaa49-3d11-47ec-a18c-cc26b1e52e99",
"name": "Google Sheets: Append Backlinks",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "33dc3004-5875-4a33-a330-df2b0e3e0ad7",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-40,
-1240
],
"parameters": {
"color": 6,
"width": 380,
"height": 1440,
"content": "## \u2705 **\ud83d\udd35 SECTION 1: Input & Trigger**\n\n### \u2699\ufe0f **Nodes**\n\n1\ufe0f\u20e3 **Trigger: Manual Execute**\n\n\n* **What it does:** This node starts the workflow manually when you click \u201cExecute Workflow.\u201d\n* **Why it\u2019s useful:** It\u2019s the simplest way to test your workflow on demand. Later, you can swap this with a **Schedule** node for daily or weekly runs.\n\n2\ufe0f\u20e3 **Set: Competitor Domain**\n\n\n* **What it does:** This node stores the **competitor\u2019s domain** you want to analyze.\n* **Example:** `ahrefs.com` or `moz.com`\n* **Why it\u2019s useful:** You can easily change domains without modifying the whole workflow. For multiple competitors, loop through them!\n\n---\n\n### \ud83d\udca1 **Beginner Benefit**\n\n\u2705 **Simple input control:** You don\u2019t need to touch code \u2014 just type your competitor\u2019s domain in one place.\n\u2705 **Reusable:** Same input can be reused for any site \u2014 just update the domain value.\n\n---\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "5ad521f9-c227-4e44-a796-68ec79d7e243",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
-1900
],
"parameters": {
"color": 3,
"width": 380,
"height": 2100,
"content": "## \u2705 **\ud83e\udd16 SECTION 2: Agent Scrape Engine**\n\n### \u2699\ufe0f **Nodes**\n\n3\ufe0f\u20e3 **Agent: Scrape Backlinks (Bright Data MCP)**\n\n\n* **What it does:** Calls your **custom scraping Agent** that uses Bright Data MCP to visit backlink explorer pages (like Ahrefs or Moz) and pull backlink data.\n* **How:** The Agent uses a secure proxy network to get around anti-bot protections and scrapes backlink profiles (URL, anchor text, type, etc.).\n* **Output:** Raw JSON with all backlinks found for the competitor.\n\n**Sub-Nodes:**\n\n* \u2699\ufe0f **MCP Client: Execute Scraper**\n \n\n * Connects directly to Bright Data\u2019s backend to run the scraper tool.\n* \ud83d\udcac **OpenAI Chat Model**\n \n\n * Optional: If your Agent needs an LLM to generate instructions or parse dynamic websites, it talks to OpenAI here.\n* \ud83d\uddc2\ufe0f **Output Parser: Backlink JSON**\n \n\n * Ensures the Agent\u2019s raw text comes out as **structured JSON** \u2192 easy to split & save later.\n\n---\n\n### \ud83d\udca1 **Beginner Benefit**\n\n\u2705 **No coding scraping:** You don\u2019t have to build scrapers from scratch. Bright Data + Agent handles the hard part.\n\u2705 **Dynamic parsing:** The OpenAI node helps the Agent handle weird or changing HTML structures.\n\u2705 **Safe & scalable:** MCP proxies handle geo-blocks and captchas for you.\n\n---\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "522c5056-4e30-418b-abc7-2fe6925a058a",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-860
],
"parameters": {
"color": 5,
"width": 400,
"height": 1060,
"content": "## \u2705 **\ud83d\udfe2 SECTION 3: Transform & Store**\n\n### \u2699\ufe0f **Nodes**\n\n4\ufe0f\u20e3 **Function: Split Backlinks**\n\n\n* **What it does:** Takes the JSON output of all backlinks and splits them into **one item per backlink**.\n* **Why:** So each backlink becomes its own row when sent to Google Sheets.\n\n5\ufe0f\u20e3 **Google Sheets: Append Backlinks**\n\n\n* **What it does:** Adds each backlink as a **new row** in your Google Sheet.\n* **Columns:** Domain, URL, anchor text, date, category, etc.\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "4f58284e-3415-4be4-beb3-09736c824369",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
-860
],
"parameters": {
"color": 7,
"width": 380,
"height": 240,
"content": "## I\u2019ll receive a tiny commission if you join Bright Data through this link\u2014thanks for fueling more free content!\n\n### https://get.brightdata.com/1tndi4600b25"
},
"typeVersion": 1
},
{
"id": "eea0c5ec-6e85-41c7-8724-983811834d0f",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1840,
-1240
],
"parameters": {
"color": 4,
"width": 1300,
"height": 320,
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
},
"typeVersion": 1
},
{
"id": "5fc4b876-acf6-47b4-8fee-857ff4c0b1ec",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1840,
-900
],
"parameters": {
"color": 4,
"width": 1289,
"height": 3898,
"content": "## \ud83c\udfaf **\ud83d\udd17 Competitor Backlink Extraction Workflow**\n\n---\n\n## \u2705 **\ud83d\udd35 SECTION 1: Input & Trigger**\n\n### \u2699\ufe0f **Nodes**\n\n1\ufe0f\u20e3 **Trigger: Manual Execute**\n\n\n* **What it does:** This node starts the workflow manually when you click \u201cExecute Workflow.\u201d\n* **Why it\u2019s useful:** It\u2019s the simplest way to test your workflow on demand. Later, you can swap this with a **Schedule** node for daily or weekly runs.\n\n2\ufe0f\u20e3 **Set: Competitor Domain**\n\n\n* **What it does:** This node stores the **competitor\u2019s domain** you want to analyze.\n* **Example:** `ahrefs.com` or `moz.com`\n* **Why it\u2019s useful:** You can easily change domains without modifying the whole workflow. For multiple competitors, loop through them!\n\n---\n\n### \ud83d\udca1 **Beginner Benefit**\n\n\u2705 **Simple input control:** You don\u2019t need to touch code \u2014 just type your competitor\u2019s domain in one place.\n\u2705 **Reusable:** Same input can be reused for any site \u2014 just update the domain value.\n\n---\n\n---\n\n## \u2705 **\ud83e\udd16 SECTION 2: Agent Scrape Engine**\n\n### \u2699\ufe0f **Nodes**\n\n3\ufe0f\u20e3 **Agent: Scrape Backlinks (Bright Data MCP)**\n\n\n* **What it does:** Calls your **custom scraping Agent** that uses Bright Data MCP to visit backlink explorer pages (like Ahrefs or Moz) and pull backlink data.\n* **How:** The Agent uses a secure proxy network to get around anti-bot protections and scrapes backlink profiles (URL, anchor text, type, etc.).\n* **Output:** Raw JSON with all backlinks found for the competitor.\n\n**Sub-Nodes:**\n\n* \u2699\ufe0f **MCP Client: Execute Scraper**\n \n\n * Connects directly to Bright Data\u2019s backend to run the scraper tool.\n* \ud83d\udcac **OpenAI Chat Model**\n \n\n * Optional: If your Agent needs an LLM to generate instructions or parse dynamic websites, it talks to OpenAI here.\n* \ud83d\uddc2\ufe0f **Output Parser: Backlink JSON**\n \n\n * Ensures the Agent\u2019s raw text comes out as **structured JSON** \u2192 easy to split & save later.\n\n---\n\n### \ud83d\udca1 **Beginner Benefit**\n\n\u2705 **No coding scraping:** You don\u2019t have to build scrapers from scratch. Bright Data + Agent handles the hard part.\n\u2705 **Dynamic parsing:** The OpenAI node helps the Agent handle weird or changing HTML structures.\n\u2705 **Safe & scalable:** MCP proxies handle geo-blocks and captchas for you.\n\n---\n\n---\n\n## \u2705 **\ud83d\udfe2 SECTION 3: Transform & Store**\n\n### \u2699\ufe0f **Nodes**\n\n4\ufe0f\u20e3 **Function: Split Backlinks**\n\n\n* **What it does:** Takes the JSON output of all backlinks and splits them into **one item per backlink**.\n* **Why:** So each backlink becomes its own row when sent to Google Sheets.\n\n5\ufe0f\u20e3 **Google Sheets: Append Backlinks**\n\n\n* **What it does:** Adds each backlink as a **new row** in your Google Sheet.\n* **Columns:** Domain, URL, anchor text, date, category, etc.\n\n---\n\n### \ud83d\udca1 **Beginner Benefit**\n\n\u2705 **Automation:** You don\u2019t need to copy-paste backlinks manually \u2014 they land in Sheets ready for outreach.\n\u2705 **Easy tracking:** Use Sheets filters to sort by link type, opportunity, or priority.\n\u2705 **Plug & play:** This section works with Airtable, Notion, or a CRM too \u2014 just switch the last node.\n\n---\n\n---\n\n## \u2705\u2705\u2705 **\u2728 FULL FLOW OVERVIEW**\n\n| Section | What happens |\n| -------------------------- | -------------------------------------------------------------------------------------------------------- |\n| \u26a1 **Input & Trigger** | You click **Execute**, add a domain, and launch the flow. |\n| \ud83e\udd16 **Agent Scrape Engine** | The Agent + Bright Data does smart scraping, handles captchas, parses messy HTML, and outputs neat JSON. |\n| \ud83d\udfe2 **Transform & Store** | The JSON is split into single backlinks and each one lands in your Google Sheet for action. |\n\n---\n\n## \ud83d\udccc **How You Benefit Overall**\n\n\u2705 No manual scraping\n\u2705 No manual copy-paste\n\u2705 No coding headaches\n\u2705 Fully automated link prospecting \u2192 just open your Sheet & start outreach!\n\n---\n\n**\u2728 This is a beginner-friendly SEO growth engine \u2014 and you built it with no code! \u2728**\n\n---\n"
},
"typeVersion": 1
},
{
"id": "e1d427ca-b97d-4026-a550-507e31b10370",
"name": "Auto-fixing Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
800,
280
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "ece54ff0-7010-4547-b73f-dc59660767c1",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
760,
520
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "ad2d763e-decd-49ce-a226-267808c93470",
"name": "Structured Output Parser",
"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,
"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
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2ApimcpClientApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Source: https://n8n.io/workflows/5963/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automatically monitors competitor social media engagement on LinkedIn to track their content performance and posting strategies. It saves you time by eliminating the need to manually che
This workflow automatically identifies and tracks backlink opportunities by analyzing competitor link profiles and finding potential linking websites. It saves you time by eliminating the need to manu
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.