{
  "name": "Find internal linking opportunities with SerpAPI and Google Sheets",
  "nodes": [
    {
      "id": "8c2aa4ad-94d0-4c52-b6bb-bee296a4420b",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        480,
        144
      ]
    },
    {
      "id": "7fccd9bf-8f71-4adf-97e4-2eff330d757f",
      "name": "Get search results using SerpAPI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        832,
        160
      ]
    },
    {
      "id": "420bdbbe-a304-4bfe-8cd8-54ab467a6d71",
      "name": "Extract links from JSON",
      "type": "n8n-nodes-base.set",
      "position": [
        1184,
        160
      ]
    },
    {
      "id": "44ca48a2-fae4-4de4-a5d7-e4d16960b914",
      "name": "Add internal URL to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1536,
        160
      ]
    },
    {
      "id": "172e75f7-9698-4c87-819e-edf94ea20612",
      "name": "Get URLs and keywords",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        128,
        144
      ]
    },
    {
      "id": "1d1a37d8-8b2b-4399-9abe-13dff9cc1ad2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -320
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## Get URLs and keywords\nIn this node, we're getting the different URLs that we want suggestions for, and the keywords/topics those pages are targeting.\n\nWe're filtering out everything that already ha"
      }
    },
    {
      "id": "2f549918-a4ca-4a99-b60a-94b903c7f994",
      "name": "Manual trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -112,
        144
      ]
    },
    {
      "id": "36b666a5-613b-43bc-a940-b5bb546bdbfa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -320
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## Loop over URLs\nLoop over each URL to get the results. Here we're doing it in batches of 5\n\n:warning: Note :warning:\nDon't set the batch size too high or you'll start hitting rate limits for some of"
      }
    },
    {
      "id": "3dc9bb5d-03c4-423b-96d0-120badad6810",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -320
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## Get search results using SerpAPI\nGet the search results from SerpAPI.\n\nWe're searching for the target keyword, while doing a `site:<domain>` search so we only get results from our site.\n\nWe use `-i"
      }
    },
    {
      "id": "75af678f-5af2-4aa7-8f00-d6fc84ee18e6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -320
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## Extract organic links from JSON\nSerpAPI gives us a bunch of data we don't need for this use case so we just filter for the organic results. specifically, we filter the URLs it gives us\n\n"
      }
    },
    {
      "id": "72d62473-fab0-4db5-92f8-4cac1ab9acb0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -320
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## Update Google Sheet\nHere we're adding the URLs to the different column in our sheet.\n\nNote that we're using an inline `if` statement so, if there's no URL present, it just adds 'N/A' to our Google "
      }
    },
    {
      "id": "e229c5a9-44c9-44c5-af81-ca2859283831",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -320
      ],
      "parameters": {
        "width": 400,
        "height": 704,
        "content": "## Overview\n\nUse this workflow to spot internal linking ideas on your site and improve your search performance. It takes your target URLs and keywords, finds related pages, and suggests where to add l"
      }
    }
  ],
  "connections": {
    "Manual trigger": {
      "main": [
        [
          {
            "node": "Get URLs and keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get search results using SerpAPI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get URLs and keywords": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract links from JSON": {
      "main": [
        [
          {
            "node": "Add internal URL to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add internal URL to Google Sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get search results using SerpAPI": {
      "main": [
        [
          {
            "node": "Extract links from JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}