{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "9137421c-a5a6-47e0-816c-4c9707c77d75",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "formTitle": "Semrush Backlink Checker",
        "formFields": {
          "values": [
            {
              "fieldLabel": "website",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Semrush Backlink Checker"
      },
      "typeVersion": 2.2
    },
    {
      "id": "885fee0f-647f-4eb3-80b3-7e37d15c9bd7",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        220,
        0
      ],
      "parameters": {
        "url": "https://semrush-backlink-checker.p.rapidapi.com/backlink.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-backlink-checker.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "05e9b4d1-a348-48d2-8f9d-3b8243b183f3",
      "name": "Reformat 1",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        0
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data.semrushAPI.backlinksOverview;"
      },
      "typeVersion": 2
    },
    {
      "id": "56aa5555-0460-453b-9518-36a82cf1eb97",
      "name": "Reformat 2",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        300
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data.semrushAPI.backlinks;"
      },
      "typeVersion": 2
    },
    {
      "id": "53bb9a7e-069b-4398-8cad-444a5d41f8f2",
      "name": "Backlink overview",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        760,
        0
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 4590546,
          "cachedResultUrl": "",
          "cachedResultName": "backlink overflow"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "backlinks"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "c4eb2b7d-d586-4300-b427-44c3c7027178",
      "name": "Backlinks ",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        700,
        300
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "targetUrl",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "targetUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sourceUrl",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "sourceUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sourceTitle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "sourceTitle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "pageAscore",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "pageAscore",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "lastSeen",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "lastSeen",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "internalNum",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "internalNum",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "firstSeen",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "firstSeen",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "externalNum",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "externalNum",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "anchor",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "anchor",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "nofollow",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "nofollow",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "backlinks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "backlinks"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "8a3c938c-b6bf-4bbb-bfa3-22b9d30ef2d2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -140
      ],
      "parameters": {
        "width": 680,
        "height": 780,
        "content": "# \ud83d\ude80 Semrush Backlink Checker Automation with n8n and Google Sheets\n\n## \ud83d\udcd8 Description\n\nThis automated n8n workflow enables users to input a website URL via a form, fetch backlink data using the Semrush Backlink Checker API (via RapidAPI), and export both an overview and detailed backlink information to Google Sheets. Ideal for SEO professionals looking to streamline backlink audits and reporting.\n\n---\n\n## \ud83e\udde9 Node-by-Node Explanation\n\n- **On form submission** \u2013 Starts the workflow when a user submits a website URL through a custom form.\n- **HTTP Request** \u2013 Sends the submitted URL to Semrush Backlink Checker API using POST with headers and body data.\n- **Reformat 1** \u2013 Extracts the `backlinksOverview` object from the API response JSON.\n- **Reformat 2** \u2013 Extracts the `backlinks` list (detailed data) from the API response JSON.\n- **Backlink overview** \u2013 Appends backlink overview metrics to the \u201cbacklink overflow\u201d sheet in a specified Google Sheets document.\n- **Backlinks** \u2013 Appends individual backlink entries (e.g. source URL, anchor, score) to the \u201cbacklinks\u201d sheet in the same Google Sheet.\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "543c484a-e96e-4ee6-ae3c-dcb9343c17e5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -140
      ],
      "parameters": {
        "height": 300,
        "content": "**On form submission** \u2013 Starts the workflow when a user submits a website URL through a custom form."
      },
      "typeVersion": 1
    },
    {
      "id": "b9ccc855-61e1-43c2-a948-b67a12dd518a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -140
      ],
      "parameters": {
        "height": 300,
        "content": "**HTTP Request** \u2013 Sends the submitted URL to Semrush Backlink Checker API using POST with headers and body data."
      },
      "typeVersion": 1
    },
    {
      "id": "a2efe122-287c-45a0-8706-b83f8e9b66b0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -140
      ],
      "parameters": {
        "height": 300,
        "content": " **Reformat 1** \u2013 Extracts the `backlinksOverview` object from the API response JSON."
      },
      "typeVersion": 1
    },
    {
      "id": "a959e928-e4b8-41b7-a5d4-a41502962113",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        200
      ],
      "parameters": {
        "height": 280,
        "content": " **Reformat 2** \u2013 Extracts the `backlinks` list (detailed data) from the API response JSON."
      },
      "typeVersion": 1
    },
    {
      "id": "5eb05e85-9c3b-41b1-9cf9-3afbcd411c5d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        -140
      ],
      "parameters": {
        "height": 300,
        "content": "**Backlink overview** \u2013 Appends backlink overview metrics to the \u201cbacklink overflow\u201d sheet in a specified Google Sheets document."
      },
      "typeVersion": 1
    },
    {
      "id": "72bcc8b0-6dc1-4802-a558-1ccb5695de9c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        220
      ],
      "parameters": {
        "height": 260,
        "content": " **Backlinks** \u2013 Appends individual backlink entries (e.g. source URL, anchor, score) to the \u201cbacklinks\u201d sheet in the same Google Sheet."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Reformat 1": {
      "main": [
        [
          {
            "node": "Backlink overview",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reformat 2": {
      "main": [
        [
          {
            "node": "Backlinks ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Reformat 1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Reformat 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}