{
  "name": "Crawl documentation sites and build an AI knowledge base with Olostep",
  "nodes": [
    {
      "id": "93d0600b-1761-428f-8b67-e917a15da853",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -256,
        224
      ]
    },
    {
      "id": "9b6038ad-662b-448a-85c8-7b132a0406c6",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        160,
        224
      ]
    },
    {
      "id": "eb0a1432-1ab5-48fa-b498-757217974c55",
      "name": "Service Name",
      "type": "n8n-nodes-base.set",
      "position": [
        -256,
        464
      ]
    },
    {
      "id": "7401b2b1-a43d-4a29-a8fe-40e9abc3e8bc",
      "name": "Create Parent Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -48,
        464
      ]
    },
    {
      "id": "8af70f1f-c2fb-442f-b7b9-1be3305ff8dd",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        400,
        448
      ]
    },
    {
      "id": "243f7547-455c-49d8-8160-dc6989a8bfe5",
      "name": "Create a map",
      "type": "n8n-nodes-olostep.olostepScrape",
      "position": [
        -48,
        224
      ]
    },
    {
      "id": "16cc6f72-7685-454a-a827-1133995198fa",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        464
      ]
    },
    {
      "id": "5e6e7cc3-ab78-4a90-b053-ba4aac5049ce",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        608,
        352
      ]
    },
    {
      "id": "aa4f21b0-caad-48f5-9c4a-d63b264fd957",
      "name": "Search files and folders",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1296,
        608
      ]
    },
    {
      "id": "7e0811ed-48fb-4ff3-ab73-88e52d6bd4ac",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1488,
        608
      ]
    },
    {
      "id": "f3722176-6062-4b55-b9da-cc8960d8f650",
      "name": "Create folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1696,
        688
      ]
    },
    {
      "id": "6f884d85-dddd-4d8d-8773-4068be63072f",
      "name": "counter",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        544
      ]
    },
    {
      "id": "8df4e323-a936-4c58-9390-8114b8aa5c41",
      "name": "counter++",
      "type": "n8n-nodes-base.set",
      "position": [
        1904,
        688
      ]
    },
    {
      "id": "60809abf-4c76-4d60-8e6c-e2261a3f28b5",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        1088,
        544
      ]
    },
    {
      "id": "acf1e25e-836e-4810-8acb-1cfe8380c0ff",
      "name": "counter++1",
      "type": "n8n-nodes-base.set",
      "position": [
        1696,
        544
      ]
    },
    {
      "id": "5887437c-f134-4f21-b7ac-c0a168a201f5",
      "name": "Scrape a URL",
      "type": "n8n-nodes-olostep.olostepScrape",
      "position": [
        1584,
        336
      ]
    },
    {
      "id": "3dd3970c-7251-4afd-9053-1c38f471f824",
      "name": "set data",
      "type": "n8n-nodes-base.set",
      "position": [
        1376,
        336
      ]
    },
    {
      "id": "b5176eb3-3a48-4e06-bc8d-63b4fee01651",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        816,
        256
      ]
    },
    {
      "id": "66ae48a6-7705-4d45-9aa3-a3621686c72a",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1904,
        96
      ]
    },
    {
      "id": "a220f30c-6118-4f22-a1d3-3a9f88c5f32f",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1856,
        320
      ]
    },
    {
      "id": "7f256970-9fb3-4de9-a097-0c9a6f0e71dd",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2464,
        320
      ]
    },
    {
      "id": "be5789db-1cf4-4a6a-b266-307276711872",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        2080,
        320
      ]
    },
    {
      "id": "07cd6030-a934-422a-ab5d-5cbbae7b9644",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2384,
        544
      ]
    },
    {
      "id": "b0d3c996-1c83-4ba6-a16c-e78a17d0c4f6",
      "name": "Create a document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        2784,
        320
      ]
    },
    {
      "id": "3c2d656e-0881-4220-9f62-0c750bb92856",
      "name": "Update a document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        2976,
        320
      ]
    },
    {
      "id": "2ecabcd6-c060-4c7d-8516-ad42fcaac332",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2272,
        320
      ]
    },
    {
      "id": "26d42d74-1df5-41e8-8ec2-2e98d515fb81",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        -384
      ],
      "parameters": {
        "width": 832,
        "height": 1792,
        "content": "# AI Documentation Crawler & Knowledge Base Builder  \n\nThis n8n template automatically crawls technical documentation websites, scrapes their content, and converts it into **clean, structured, develop"
      }
    },
    {
      "id": "b59393ae-e8a8-4466-ab0c-91558d51f17f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        128
      ],
      "parameters": {
        "width": 624,
        "height": 240,
        "content": "## Creates a Map\nCrawls the root documentation URL and generates a full sitemap.\nReturns all discoverable documentation URLs under the given domain."
      }
    },
    {
      "id": "828f217c-9cb4-4e3e-b31d-c53cee0a3c16",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        368
      ],
      "parameters": {
        "width": 624,
        "height": 256,
        "content": "## Creates Parent Folder\nCreates a parent folder for this service in Google Drive.\nAll generated API reference documents will be stored here."
      }
    },
    {
      "id": "fbeaefd2-55fd-4e73-918b-f32afeffde2c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        272
      ],
      "parameters": {
        "width": null,
        "height": 352,
        "content": "## Merge\nMerges service metadata with the list of documentation URLs\nso both are available during processing."
      }
    },
    {
      "id": "5ce248f9-41d7-47d2-89a1-fa1211ab1a8f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        384
      ],
      "parameters": {
        "width": 448,
        "height": 480,
        "content": "## Counter\nTracks the current URL depth being processed.\nUsed to dynamically create nested folder structures that match the doc hierarchy. After that checks whether additional URL path segments exist."
      }
    },
    {
      "id": "1679e8af-6fea-4d89-83d2-b7a373d19b47",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        496
      ],
      "parameters": {
        "width": 416,
        "height": 368,
        "content": "## Search files/folders\nChecks if a folder for the current documentation section already exists.\nPrevents duplicate folder creation."
      }
    },
    {
      "id": "e32d6342-bee9-4d15-b3d9-76a139ba99d0",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        496
      ],
      "parameters": {
        "width": 368,
        "height": 368,
        "content": "## Create Folder\nCreates a subfolder that mirrors the documentation URL structure.\nKeeps generated docs neatly organized by section.\n\nIncrements the URL depth counter.\nMoves the workflow deeper into t"
      }
    },
    {
      "id": "ae7b1cc9-4c9f-4cb9-b6c4-8205c8ec9e96",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        496
      ],
      "parameters": {
        "width": 160,
        "height": 368,
        "content": ""
      }
    },
    {
      "id": "9b11932b-6bad-4163-81cd-51fa4de5c28d",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        224
      ],
      "parameters": {
        "width": 512,
        "height": 272,
        "content": "## Scrape URL\nScrapes the full documentation page content.\nExtracts clean markdown content for AI processing."
      }
    },
    {
      "id": "10d153fd-c057-48df-82f2-634f510f3a6f",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        -16
      ],
      "parameters": {
        "width": 464,
        "height": 512,
        "content": "## Information extractor\nUses AI to extract structured metadata from the documentation: Curl example, endpoint summary, authentication method, and common pitfalls."
      }
    },
    {
      "id": "f075928a-ed3a-4c4c-a6e6-56d1b8c94bc8",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2208,
        208
      ],
      "parameters": {
        "width": 512,
        "height": 288,
        "content": "## Writer Agent\nConverts raw documentation + extracted metadata into a clean,\ndeveloper-friendly API reference article."
      }
    },
    {
      "id": "b09c514b-d0f7-47e7-900f-8bf40bbb1efe",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2720,
        208
      ],
      "parameters": {
        "width": 416,
        "height": 288,
        "content": "## Create a Document\nCreates a new Google Doc for the current documentation page and update that document with the full context.\nThe document title matches the URL path segment."
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "counter++1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "set data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "counter": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Create a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set data": {
      "main": [
        [
          {
            "node": "Scrape a URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "counter++": {
      "main": [
        [
          {
            "node": "counter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "counter++1": {
      "main": [
        [
          {
            "node": "counter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Create a map": {
      "main": [
        [
          {
            "node": "Service Name",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape a URL": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Service Name": {
      "main": [
        [
          {
            "node": "Create Parent Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folder": {
      "main": [
        [
          {
            "node": "counter++",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "counter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a document": {
      "main": [
        [
          {
            "node": "Update a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update a document": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Parent Folder": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Create a map",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}