{
  "name": "Monitor Google Search rankings with SerpApi and Google Sheets",
  "nodes": [
    {
      "id": "be9f2df9-ac78-4b5a-b2a2-5f4d2105cd40",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        400
      ],
      "parameters": {
        "width": 624,
        "height": 460,
        "content": "## Kick Off the Workflow\n\nConfigured to run at 10 AM UTC every day. Adjust as needed or trigger it manually.\n\nAdd your own Google Sheet in the Google Sheet node to fetch your keywords and domains to m"
      }
    },
    {
      "id": "ef8aad69-9f80-4f3e-8ab3-9a95b9d57d90",
      "name": "Loop Over Keywords",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1104,
        704
      ]
    },
    {
      "id": "91dae5e2-f466-429f-86eb-218e995b7691",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2560,
        224
      ],
      "parameters": {
        "width": 632,
        "height": 628,
        "content": "## Update Google Sheet\n\nLogs results and updates last run overview sheet.\n\nAdd your own Google Sheet here.\n\nIf the mappings get cleared when you add your Google Sheet, here they are:\n\nsearched_at: `{{"
      }
    },
    {
      "id": "818e696f-02f0-4731-a327-571b4fd26dac",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        208
      ],
      "parameters": {
        "width": 598,
        "height": 912,
        "content": "## Google Keyword SEO Monitoring\n\n### What this is about\n\nThis workflow enables SEO monitoring by checking Google rank positions for a list of keywords and domains. It uses SerpApi's Google Search API"
      }
    },
    {
      "id": "d77d05eb-09cb-40b3-be88-efc9e8c01b2e",
      "name": "Update Latest Run",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2832,
        688
      ]
    },
    {
      "id": "0ff07a23-0a37-4ac7-9d7a-0cf5809b93c1",
      "name": "Search Google",
      "type": "n8n-nodes-serpapi.serpApi",
      "position": [
        1712,
        704
      ]
    },
    {
      "id": "627b4185-71b0-4fd7-ac7b-f79ccdcec6b2",
      "name": "Update Rank Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2624,
        688
      ]
    },
    {
      "id": "754e9a3a-6cbc-4df2-8fa8-eaf47e511cf5",
      "name": "Get Keywords and Domains to Match",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        704
      ]
    },
    {
      "id": "04bc2052-d3ea-46da-8e21-29f4dd089872",
      "name": "If - Next Page or Next Keyword",
      "type": "n8n-nodes-base.if",
      "position": [
        2368,
        704
      ]
    },
    {
      "id": "0c5b2240-64ef-415f-8083-47cc88e3df24",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        400
      ],
      "parameters": {
        "width": 364,
        "height": 460,
        "content": "## Set Page Limit & Match Type\n\nTemplate defaults to checking up to 10 pages to find a domain. Update `data.pagination_limit` here to set your own limit.\n\nTemplate defaults to match on domain. Update "
      }
    },
    {
      "id": "5b8d033b-276b-40b5-8f26-b4d95b11c890",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2304,
        400
      ],
      "parameters": {
        "width": 236,
        "height": 460,
        "content": "## Next Page or Next Keyword\n\nIf a match is found or the pagination limit is hit, it goes to the next keyword. Otherwise, it requests another page for the same keyword. "
      }
    },
    {
      "id": "46c24178-51bc-45b2-b0ec-cfcb737b9926",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        224
      ],
      "parameters": {
        "width": 636,
        "height": 636,
        "content": "## Search & Parse Rank\n\nThe SerpApi node searches the keyword in through Google Search API.\n\nThe code finds and parses the target domain's rank. Assigns \"N/A\" if a domain is not found in the results.\n"
      }
    },
    {
      "id": "d901ec60-bdf1-4cc6-8a33-6d8d7f435945",
      "name": "Parse Rank for Target Domain or Page",
      "type": "n8n-nodes-base.code",
      "position": [
        2032,
        704
      ]
    },
    {
      "id": "38f38f68-2d4a-4b80-9fb3-61e6ec608288",
      "name": "Set Page Limit & Match Type",
      "type": "n8n-nodes-base.code",
      "position": [
        1408,
        704
      ]
    },
    {
      "id": "3fd04db6-1be6-45fa-996c-33b33515e2e2",
      "name": "Wait Before Next Keyword",
      "type": "n8n-nodes-base.wait",
      "position": [
        3040,
        688
      ]
    },
    {
      "id": "6f5ac293-183c-4b90-b755-d936f40afb20",
      "name": "Schedule Workflow",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        688,
        704
      ]
    }
  ],
  "connections": {
    "Search Google": {
      "main": [
        [
          {
            "node": "Parse Rank for Target Domain or Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Rank Log": {
      "main": [
        [
          {
            "node": "Update Latest Run",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Workflow": {
      "main": [
        [
          {
            "node": "Get Keywords and Domains to Match",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Latest Run": {
      "main": [
        [
          {
            "node": "Wait Before Next Keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Keywords": {
      "main": [
        [],
        [
          {
            "node": "Set Page Limit & Match Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Next Keyword": {
      "main": [
        [
          {
            "node": "Loop Over Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Page Limit & Match Type": {
      "main": [
        [
          {
            "node": "Search Google",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Next Page or Next Keyword": {
      "main": [
        [
          {
            "node": "Update Rank Log",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search Google",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Keywords and Domains to Match": {
      "main": [
        [
          {
            "node": "Loop Over Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Rank for Target Domain or Page": {
      "main": [
        [
          {
            "node": "If - Next Page or Next Keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}