{
  "name": "Github webhook-based n8n workflow import template",
  "nodes": [
    {
      "id": "6dcae6fd-9631-4f73-985c-31c08cfba106",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -200,
        -45
      ]
    },
    {
      "id": "62de08a4-db11-4602-9e4b-756fdecd2809",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        900,
        -20
      ]
    },
    {
      "id": "faff0550-2ddd-4903-a2c2-c6081cf3098e",
      "name": "create workflows sub folder if not exist",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        20,
        -45
      ]
    },
    {
      "id": "2b9a3378-f36a-4a25-bcc1-82fa403b85a7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -300
      ],
      "parameters": {
        "width": 520,
        "height": 500,
        "content": "# Github import\nThis webhook is secured with a basic authentication credential. Make sure to edit it to values you own.\n\nThe webhook receives the github owner and repository from whitch it should impo"
      }
    },
    {
      "id": "9143f124-30b5-4a55-b3b7-03cd3c4fdfe8",
      "name": "List files from specified repo root",
      "type": "n8n-nodes-base.github",
      "position": [
        240,
        -45
      ]
    },
    {
      "id": "f28d4f42-e7a0-4a25-8d1e-44de3a04f11a",
      "name": "Loop Over Files",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        460,
        -40
      ]
    },
    {
      "id": "64d6aeac-bc11-4204-bea5-7f678fddf2b7",
      "name": "If it is a json file",
      "type": "n8n-nodes-base.if",
      "position": [
        680,
        -120
      ]
    },
    {
      "id": "8c4f7bcc-0c3c-4333-a39e-51d29be43c87",
      "name": "Download file",
      "type": "n8n-nodes-base.github",
      "position": [
        900,
        -220
      ]
    },
    {
      "id": "27ee1e73-66d5-4c86-a6ea-6be4786bc97e",
      "name": "Store file locally",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1140,
        -60
      ]
    },
    {
      "id": "3a2a58ae-2f8f-447a-8a95-073d1f5575d6",
      "name": "Call n8n import and cleanup folder",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        680,
        -320
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "create workflows sub folder if not exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Store file locally",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Files": {
      "main": [
        [
          {
            "node": "Call n8n import and cleanup folder",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If it is a json file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store file locally": {
      "main": [
        [
          {
            "node": "Loop Over Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If it is a json file": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Operation, do nothing": {
      "main": [
        [
          {
            "node": "Loop Over Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List files from specified repo root": {
      "main": [
        [
          {
            "node": "Loop Over Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "create workflows sub folder if not exist": {
      "main": [
        [
          {
            "node": "List files from specified repo root",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}