{
  "name": "Submit sitemap URLs from Oncrawl to Google Indexing API and IndexNow",
  "nodes": [
    {
      "id": "b28e0165-f964-46a3-b371-784d9852c8a7",
      "name": "Split In Batches (IndexNow ≤500)1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4736,
        3808
      ]
    },
    {
      "id": "7dacb2d5-c8b5-4f45-9fb9-234302bc1198",
      "name": "Wait (IndexNow jitter)1",
      "type": "n8n-nodes-base.wait",
      "position": [
        5424,
        3904
      ]
    },
    {
      "id": "628192e3-9583-4234-8de1-6079843b29d0",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4416,
        3680
      ],
      "parameters": {
        "width": 1312,
        "height": 528,
        "content": "### IndexNow Autosubmitting\n* Gate: IndexNow: Is USE_INDEXNOW is true from Config?\n* Split in Batches: split in batch of 500 URLs max\n* Build IndexNow payload: description in the node name\n* IndexNow "
      }
    },
    {
      "id": "ee76fb30-8747-4bb0-afa6-5e8d55dfb047",
      "name": "Get Orphan Pages",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3232,
        4560
      ]
    },
    {
      "id": "d6a3f138-7788-4659-af38-b90dbc961060",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2976,
        4272
      ],
      "parameters": {
        "width": 1200,
        "height": 464,
        "content": "## VariationA: Index orphan pages\n* API documentation: https://developer.oncrawl.com/#Data-API\n* OQL definition: Get orphan pages for both sitemaps & logs\n* Merge node: Merge Items that InnerJoin loc,"
      }
    },
    {
      "id": "953de3b8-b42d-43e0-b735-1bc3b24a937c",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        624,
        3456
      ]
    },
    {
      "id": "e266f6de-c458-4498-a3ef-137d6aaf1f03",
      "name": "Post - Get Sitemaps",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1024,
        3456
      ]
    },
    {
      "id": "9b5eedb3-e9c2-453d-8b9d-22a6a57aa7e7",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        3456
      ]
    },
    {
      "id": "e6e4f92b-2c72-43a6-83b3-809c5f3f255e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        3072
      ],
      "parameters": {
        "width": 304,
        "height": 576,
        "content": "### Call to Discover_sitemaps endpoint\nThis endpoint checks the Sitemaps declared in your Robots.txt file.\n- doc: https://developer.oncrawl.com/\n \n"
      }
    },
    {
      "id": "dacf4691-0607-4e5c-87c0-37d23fd331fc",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        2960
      ],
      "parameters": {
        "width": 416,
        "height": 688,
        "content": "### Config File\n**You MUST** update these variables:\n* SITE_URL\n* SITEMAP_URL: Fo subdomain sitemaps, you can duplicate this field.\n* INDEXNOW_KEY: you can create it in the Bing Webmaster tools here h"
      }
    },
    {
      "id": "cd67138d-9527-4f92-80a6-d1c485a7d28c",
      "name": "Assign mandatory sitemap fields",
      "type": "n8n-nodes-base.set",
      "position": [
        3696,
        3456
      ]
    },
    {
      "id": "bf72c629-fd76-4cfc-8fc4-48c6bb32cf0a",
      "name": "Filter: lastmod within DAYS_BACK",
      "type": "n8n-nodes-base.code",
      "position": [
        4016,
        3456
      ]
    },
    {
      "id": "1976aed2-0932-47c7-80c2-c70454ebb54d",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3248,
        3456
      ]
    },
    {
      "id": "e6bb1efd-653c-4b0a-a0ea-01759909fbd3",
      "name": "Get sitemap.xml",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1920,
        3456
      ]
    },
    {
      "id": "cf38189d-00b0-4187-942e-327de0f0c4af",
      "name": "Convert sitemap to JSON",
      "type": "n8n-nodes-base.xml",
      "position": [
        2128,
        3456
      ]
    },
    {
      "id": "9addc25e-3e78-4372-8d77-a1df68877c1c",
      "name": "Get content-specific sitemaps",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2352,
        3456
      ]
    },
    {
      "id": "9c14b6d7-d924-49ed-8f94-65cf2d25ebfc",
      "name": "Get content of each sitemap",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2576,
        3456
      ]
    },
    {
      "id": "fb866818-5bde-4922-afbf-168c9acb45d5",
      "name": "convert page data to JSON",
      "type": "n8n-nodes-base.xml",
      "position": [
        2800,
        3456
      ]
    },
    {
      "id": "e33bc3e0-f5bc-4264-bfa0-07531a7ca2b7",
      "name": "Force urlset.url to array",
      "type": "n8n-nodes-base.set",
      "position": [
        3024,
        3456
      ]
    },
    {
      "id": "477bd95e-2587-4273-a444-1a4f70504661",
      "name": "Sort",
      "type": "n8n-nodes-base.sort",
      "position": [
        3472,
        3456
      ]
    },
    {
      "id": "fe04aa09-a5cd-45fc-a9f9-fcd25a354a68",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        3152
      ],
      "parameters": {
        "width": 2032,
        "height": 496,
        "content": "### Parsing the sitemap and generating a list of the urls order by last modification date.\n* No need to edit anything here"
      }
    },
    {
      "id": "bc4ddb14-7fa7-4d15-9b35-4cb0ec1e32a2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3888,
        3152
      ],
      "parameters": {
        "width": 384,
        "height": 496,
        "content": "### Filter to prevent API rate limiting issues\nCut-off calculation based on Now date -  Date set as DAYS_BACK"
      }
    },
    {
      "id": "04805157-02f8-49d4-9ebb-09a191432b78",
      "name": "Build IndexNow payload",
      "type": "n8n-nodes-base.code",
      "position": [
        4976,
        3824
      ]
    },
    {
      "id": "7049b17e-ac66-4ca7-b5da-0f4478655dc9",
      "name": "IndexNow Submit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5184,
        3824
      ]
    },
    {
      "id": "a8a081fb-7435-4dae-9734-55afa2ab91cc",
      "name": "Gate: IndexNow",
      "type": "n8n-nodes-base.code",
      "position": [
        4496,
        3904
      ]
    },
    {
      "id": "dfc0307b-0f1c-4079-9055-00e718377b12",
      "name": "Gate: Google",
      "type": "n8n-nodes-base.code",
      "position": [
        4544,
        3344
      ]
    },
    {
      "id": "ee667998-e924-4ed1-b7d4-fcd2726a382c",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        6096,
        3360
      ]
    },
    {
      "id": "df1131d8-87d2-47d4-b85a-d4e68c7d8bed",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        5296,
        3280
      ]
    },
    {
      "id": "4efd2e77-52ee-4912-9572-741be47902ec",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4432,
        2992
      ],
      "parameters": {
        "width": 1888,
        "height": 608,
        "content": "## Submit URLs to Google for indexing\n\nFor details, please check the Node documentation.\n- Gate: Is USE_GOOGLE is true from Config?\n- Loop_Over_Items: Fetch each URLs within the DAYS_BACK period range"
      }
    },
    {
      "id": "843eeaa7-148a-4709-91c8-bd743ca263dd",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4832,
        3344
      ]
    },
    {
      "id": "ee0efb25-7742-4eda-8bc0-2a1dbac3938e",
      "name": "Check status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5088,
        3360
      ]
    },
    {
      "id": "0c25fe18-e2b5-43f5-815b-5cb12d6ae4a9",
      "name": "is new?",
      "type": "n8n-nodes-base.if",
      "position": [
        5568,
        3200
      ]
    },
    {
      "id": "de36c661-0a21-4a2e-bcf6-267029435256",
      "name": "URL Updated",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5776,
        3344
      ]
    },
    {
      "id": "2a45b2b1-10fc-412d-82b8-e1a2715c96af",
      "name": "Config - Orphan",
      "type": "n8n-nodes-base.set",
      "position": [
        3024,
        4560
      ]
    },
    {
      "id": "c40f4d40-46a1-440d-8d7e-9db21119d025",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        3936,
        4416
      ]
    },
    {
      "id": "1ca623f6-931c-42b7-90a0-739047ac7626",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2960,
        4864
      ],
      "parameters": {
        "width": 1200,
        "height": 464,
        "content": "## VariationB: Index newly added pages between a Crawl 1 & a Crawl2\n* API documentation: https://developer.oncrawl.com/#Data-API\n* OQL definition: Return added Indexable canonical pages in Crawl2\n* Me"
      }
    },
    {
      "id": "224ca370-3175-445d-925e-fe4a3fb68193",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        3072
      ],
      "parameters": {
        "width": 384,
        "height": 576,
        "content": "## Webhook\n* When crawl is over, a HTTP callback response is made to the N8N webhook URL.\n* doc: https://developer.oncrawl.com/#notification"
      }
    },
    {
      "id": "2b5c90ae-5ca0-4687-bcc8-2257cdb1346c",
      "name": "Get Crawl over crawl",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3248,
        5136
      ]
    },
    {
      "id": "cd1fb27f-a26f-46a0-9b16-a28bc11b5adc",
      "name": "Split Out - Orphan1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3456,
        4560
      ]
    },
    {
      "id": "5f49e07f-b0a8-4897-a7f0-c38fc1179393",
      "name": "Split Out - Orphan2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3680,
        4560
      ]
    },
    {
      "id": "467cd7d0-9709-446a-88d1-53a9c308281c",
      "name": "Split Out - Coc1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3664,
        5136
      ]
    },
    {
      "id": "2ecd3fcf-5770-442a-93d1-13a76d546b15",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        3904,
        5024
      ]
    },
    {
      "id": "a994315f-6a64-4272-af0f-78795a6eedbd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        2896
      ],
      "parameters": {
        "width": 784,
        "height": 1088,
        "content": "## Try it out!\nAn SEO Workflow to get your most important pages indexed with Oncrawl.\n\nWhy is it important for SEO?\n- IndexNow is an open source protocol developped by Bing and Yandex. Many generative"
      }
    }
  ],
  "connections": {
    "Sort": {
      "main": [
        [
          {
            "node": "Assign mandatory sitemap fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "Get sitemap.xml",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "is new?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "URL Updated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Post - Get Sitemaps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "is new?": {
      "main": [
        [
          {
            "node": "URL Updated",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "URL Updated": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check status": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gate: Google": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gate: IndexNow": {
      "main": [
        [
          {
            "node": "Split In Batches (IndexNow ≤500)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config - Orphan": {
      "main": [
        [
          {
            "node": "Get Orphan Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get sitemap.xml": {
      "main": [
        [
          {
            "node": "Convert sitemap to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IndexNow Submit": {
      "main": [
        [
          {
            "node": "Wait (IndexNow jitter)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Check status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Orphan Pages": {
      "main": [
        [
          {
            "node": "Split Out - Orphan1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - Coc1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Post - Get Sitemaps": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - Orphan1": {
      "main": [
        [
          {
            "node": "Split Out - Orphan2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - Orphan2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Crawl over crawl": {
      "main": [
        [
          {
            "node": "Split Out - Coc1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build IndexNow payload": {
      "main": [
        [
          {
            "node": "IndexNow Submit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert sitemap to JSON": {
      "main": [
        [
          {
            "node": "Get content-specific sitemaps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait (IndexNow jitter)1": {
      "main": [
        [
          {
            "node": "Split In Batches (IndexNow ≤500)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Force urlset.url to array": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "convert page data to JSON": {
      "main": [
        [
          {
            "node": "Force urlset.url to array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get content of each sitemap": {
      "main": [
        [
          {
            "node": "convert page data to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get content-specific sitemaps": {
      "main": [
        [
          {
            "node": "Get content of each sitemap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign mandatory sitemap fields": {
      "main": [
        [
          {
            "node": "Filter: lastmod within DAYS_BACK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: lastmod within DAYS_BACK": {
      "main": [
        [
          {
            "node": "Gate: IndexNow",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gate: Google",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split In Batches (IndexNow ≤500)1": {
      "main": [
        [],
        [
          {
            "node": "Build IndexNow payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}