{
  "name": "Scrape and store data from multiple website pages",
  "nodes": [
    {
      "id": null,
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -140,
        820
      ]
    },
    {
      "id": null,
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        820
      ]
    },
    {
      "id": null,
      "name": "HTML Extract",
      "type": "n8n-nodes-base.htmlExtract",
      "position": [
        510,
        820
      ]
    },
    {
      "id": null,
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        910,
        820
      ]
    },
    {
      "id": null,
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2250,
        740
      ]
    },
    {
      "id": null,
      "name": "HTML Extract1",
      "type": "n8n-nodes-base.htmlExtract",
      "position": [
        2750,
        590
      ]
    },
    {
      "id": null,
      "name": "MongoDB1",
      "type": "n8n-nodes-base.mongoDb",
      "position": [
        3280,
        590
      ]
    },
    {
      "id": null,
      "name": "uProc",
      "type": "n8n-nodes-base.uproc",
      "position": [
        1100,
        820
      ]
    },
    {
      "id": null,
      "name": "Prepare Documents",
      "type": "n8n-nodes-base.function",
      "position": [
        2930,
        590
      ]
    },
    {
      "id": null,
      "name": "More Countries",
      "type": "n8n-nodes-base.if",
      "position": [
        2810,
        1100
      ]
    },
    {
      "id": null,
      "name": "Set Page to Scrape",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1290,
        680
      ]
    },
    {
      "id": null,
      "name": "More Pages",
      "type": "n8n-nodes-base.if",
      "position": [
        3070,
        1020
      ]
    },
    {
      "id": null,
      "name": "Set More Pages",
      "type": "n8n-nodes-base.function",
      "position": [
        3470,
        590
      ]
    },
    {
      "id": null,
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "position": [
        1440,
        680
      ]
    },
    {
      "id": null,
      "name": "Generate filename",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1600,
        610
      ]
    },
    {
      "id": null,
      "name": "Read Binary File",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        1770,
        610
      ]
    },
    {
      "id": null,
      "name": "File exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        1950,
        610
      ]
    },
    {
      "id": null,
      "name": "Write Binary File",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        2400,
        740
      ]
    },
    {
      "id": null,
      "name": "Read Binary File1",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        2570,
        590
      ]
    },
    {
      "id": null,
      "name": "Wait",
      "type": "n8n-nodes-base.function",
      "position": [
        2090,
        740
      ]
    },
    {
      "id": null,
      "name": "Prepare countries",
      "type": "n8n-nodes-base.function",
      "position": [
        700,
        820
      ]
    },
    {
      "id": null,
      "name": "Create Directory",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        70,
        820
      ]
    },
    {
      "id": null,
      "name": "MongoDB",
      "type": "n8n-nodes-base.mongoDb",
      "position": [
        3100,
        520
      ]
    }
  ],
  "connections": {
    "Set": {
      "main": [
        [
          {
            "node": "Generate filename",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "uProc": {
      "main": [
        [
          {
            "node": "Set Page to Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB": {
      "main": [
        []
      ]
    },
    "MongoDB1": {
      "main": [
        [
          {
            "node": "Set More Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "More Pages": {
      "main": [
        [
          {
            "node": "Set Page to Scrape",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "More Countries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File exists?": {
      "main": [
        [
          {
            "node": "Read Binary File1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML Extract": {
      "main": [
        [
          {
            "node": "Prepare countries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "HTML Extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML Extract1": {
      "main": [
        [
          {
            "node": "Prepare Documents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Write Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "More Countries": {
      "main": [
        [],
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set More Pages": {
      "main": [
        [
          {
            "node": "More Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches": {
      "main": [
        [
          {
            "node": "uProc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Directory": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Binary File": {
      "main": [
        [
          {
            "node": "File exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate filename": {
      "main": [
        [
          {
            "node": "Read Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Documents": {
      "main": [
        [
          {
            "node": "MongoDB1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare countries": {
      "main": [
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Binary File1": {
      "main": [
        [
          {
            "node": "HTML Extract1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Binary File": {
      "main": [
        [
          {
            "node": "Read Binary File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Page to Scrape": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Create Directory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}