{
  "name": "Backup Squarespace code injections to Github",
  "nodes": [
    {
      "id": "e0811eee-5bfe-4e48-8bd2-76b415261e93",
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        820,
        486.1164603611751
      ]
    },
    {
      "id": "e48028e0-d88a-4681-84b8-fa17fe695344",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2380,
        580
      ]
    },
    {
      "id": "0dd2a2b1-8c19-4d7a-a631-d934320bcf74",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        820,
        686.1164603611751
      ]
    },
    {
      "id": "a1bc1313-5993-4d10-b322-0b31dd005d00",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        240
      ],
      "parameters": {
        "width": 371.1995072042308,
        "height": 600.88409546716,
        "content": "## Backup to GitHub \nThis workflow will backup Squarespace header & footer Injections to Github\n\n\n### Setup\n👉 Edit the Squarespace node to place the website URL there\n\n👉 Open `Globals` node and update"
      }
    },
    {
      "id": "125b425c-1f59-4984-8658-e57d3145cccd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        400
      ],
      "parameters": {
        "width": 1066,
        "height": 435,
        "content": "## Main workflow loop"
      }
    },
    {
      "id": "626d534f-f2fb-4493-af58-0f5e309c58d4",
      "name": "Get Squarespace data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1140,
        600
      ]
    },
    {
      "id": "e2b1481e-b9de-4006-92b6-4677b4e11213",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        460
      ],
      "parameters": {
        "width": 170,
        "height": 120,
        "content": "## Edit this node 👇\nSquarespace URL"
      }
    },
    {
      "id": "e8fb73af-9999-43cd-9857-564a049b2579",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        3060,
        600
      ]
    },
    {
      "id": "679cd20a-c124-4f89-aea3-14dc5a739826",
      "name": "Clean up Footers",
      "type": "n8n-nodes-base.code",
      "position": [
        1620,
        460
      ]
    },
    {
      "id": "92150603-acbd-41bf-8cf2-b6891e08e326",
      "name": "Clean up Headers",
      "type": "n8n-nodes-base.code",
      "position": [
        1620,
        680
      ]
    },
    {
      "id": "a777d9ca-2841-47dc-a4d5-5ae36713d4a2",
      "name": "Get Footer Injection",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        460
      ]
    },
    {
      "id": "c8cdf09b-0218-4dbc-9564-e84d123ad5d7",
      "name": "Get Header Injection",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        680
      ]
    },
    {
      "id": "7ca88a4d-f438-4d3a-b3ce-e66f1dd3ae00",
      "name": "Edit Injection data",
      "type": "n8n-nodes-base.github",
      "position": [
        2840,
        600
      ]
    },
    {
      "id": "34ae1cf2-0abb-4fec-b60c-35c44f92020d",
      "name": "Create Injection data",
      "type": "n8n-nodes-base.github",
      "position": [
        3280,
        620
      ]
    },
    {
      "id": "40ae14ee-ce39-4706-898c-51957f52328d",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        2640,
        600
      ]
    },
    {
      "id": "d20a5274-66e8-4053-b29d-e814e67a3f0e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2600,
        480
      ],
      "parameters": {
        "width": 150,
        "height": 80,
        "content": "## Edit this node 👇"
      }
    },
    {
      "id": "db43654b-22bc-4c0e-9b6a-6f1dded7deb8",
      "name": "Merge Injections",
      "type": "n8n-nodes-base.merge",
      "position": [
        2140,
        580
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create Injection data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Globals": {
      "main": [
        [
          {
            "node": "Edit Injection data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean up Footers": {
      "main": [
        [
          {
            "node": "Merge Injections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean up Headers": {
      "main": [
        [
          {
            "node": "Merge Injections",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Injections": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Squarespace data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Injection data": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Footer Injection": {
      "main": [
        [
          {
            "node": "Clean up Footers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Header Injection": {
      "main": [
        [
          {
            "node": "Clean up Headers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Squarespace data": {
      "main": [
        [
          {
            "node": "Get Header Injection",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Footer Injection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Injection data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Get Squarespace data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}