{
  "name": "Generate a hierarchical sitemap from a URL into Google Sheets using Firecrawl",
  "nodes": [
    {
      "id": "0fe60fa7-bb31-4fbe-a0c2-e3f34fa82382",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -576
      ],
      "parameters": {
        "width": 816,
        "height": 336,
        "content": "## Need more advanced automation solutions? Contact us for custom enterprise workflows!\n\n# Growth-AI.fr\n\n## https://www.linkedin.com/in/allanvaccarizi/\n## https://www.linkedin.com/in/hugo-marinier-%F0"
      }
    },
    {
      "id": "28a285eb-ea10-497c-9492-fdb968e86830",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -608
      ],
      "parameters": {
        "width": 1024,
        "height": 400,
        "content": "![Logo Growth AI](https://cdn.prod.website-files.com/6825df5b20329ba581df4914/68d413c43f8729fa336568a6_Logo_horizontal.png)"
      }
    },
    {
      "id": "62181c94-d08e-40f5-b47e-dfdad5b8d0d2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -160
      ],
      "parameters": {
        "width": 480,
        "height": 896,
        "content": "## Website mapping\n\n### How it works\n\n1. The workflow is triggered when a chat message is received, typically containing a website URL to crawl.\n2. Firecrawl maps the website and retrieves all availab"
      }
    },
    {
      "id": "934445d5-9c50-412b-8b72-ea365e82f21d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -160
      ],
      "parameters": {
        "width": 448,
        "height": 320,
        "content": "## Trigger and website crawl\n\nReceives a chat message to initiate the workflow, then uses Firecrawl to map a website and retrieve all its URLs."
      }
    },
    {
      "id": "2127c702-c800-4059-a450-612bce8d2339",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        -160
      ],
      "parameters": {
        "width": 432,
        "height": 480,
        "content": "## Validate response or stop\n\nChecks whether the Firecrawl response was successful. If the check fails, the workflow halts immediately with an error message."
      }
    },
    {
      "id": "ca2ff766-42c0-4a19-9aec-bf9503c9dba9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -160
      ],
      "parameters": {
        "width": 576,
        "height": 320,
        "content": "## Structure and save URL data\n\nCopies a Google Drive template, sorts the crawled URLs into a structured table via custom code, then writes the final mapped data into a Google Sheet."
      }
    },
    {
      "id": "841c6c91-6ec8-469f-a25c-0fa783292a17",
      "name": "If Firecrawl Succeeded",
      "type": "n8n-nodes-base.if",
      "position": [
        672,
        0
      ]
    },
    {
      "id": "1653cf0b-b40a-40c9-9e14-76850f11adf6",
      "name": "Copy Report Template in Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1136,
        0
      ]
    },
    {
      "id": "7358b789-e740-466c-9edc-e235eb3221d4",
      "name": "Append URL Data to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1504,
        0
      ]
    },
    {
      "id": "811ccac9-9dbb-4558-9a72-821765611f9b",
      "name": "Organize URLs into Table Format",
      "type": "n8n-nodes-base.code",
      "position": [
        1328,
        0
      ]
    },
    {
      "id": "40ae0f18-c854-4eb9-9114-8e10dac4ac25",
      "name": "Crawl Website and Get URLs",
      "type": "@mendable/n8n-nodes-firecrawl.firecrawl",
      "position": [
        432,
        0
      ]
    },
    {
      "id": "ef0c586c-cedb-461d-80ad-7e07afa1e77f",
      "name": "Stop on Firecrawl Failure",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        912,
        160
      ]
    },
    {
      "id": "de29569c-eba9-4d78-baff-df60e99239f4",
      "name": "When Chat Message Received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        176,
        0
      ]
    },
    {
      "id": "d0f9fa91-649c-4590-a732-a0e45b2e86f7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        432
      ],
      "parameters": {
        "width": 1152,
        "height": 128,
        "content": "# Google Sheets Template\n## https://docs.google.com/spreadsheets/d/1YEk44f6DlFqJIx9LGKyMxJS8Y0WQD2BXNJQB4wD-_G0\n"
      }
    }
  ],
  "connections": {
    "If Firecrawl Succeeded": {
      "main": [
        [
          {
            "node": "Copy Report Template in Drive",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop on Firecrawl Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crawl Website and Get URLs": {
      "main": [
        [
          {
            "node": "If Firecrawl Succeeded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Chat Message Received": {
      "main": [
        [
          {
            "node": "Crawl Website and Get URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Copy Report Template in Drive": {
      "main": [
        [
          {
            "node": "Organize URLs into Table Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Organize URLs into Table Format": {
      "main": [
        [
          {
            "node": "Append URL Data to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}