{
  "name": "Monitor multiple Github repos via webhook",
  "nodes": [
    {
      "id": "95252956-51fb-49ee-924e-df01ea27b98d",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        60,
        340
      ]
    },
    {
      "id": "bfaaee00-7545-404b-9526-fb77726e833e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        120
      ],
      "parameters": {
        "width": 819.6790739248162,
        "height": 212.7465225154412,
        "content": "# Monitor Multiple Github Repos\nThis workflow allows you to monitor multiple Github repos simultaneously without polling due to use of Webhooks. It programmatically allows for adding and deleting of r"
      }
    },
    {
      "id": "d1075f59-356e-47c4-9f85-c9067127d70f",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        380,
        340
      ]
    },
    {
      "id": "7d2a3226-e3b1-4cab-91e2-01f60c1184cb",
      "name": "Register Github Webhook",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        540,
        340
      ]
    },
    {
      "id": "c1b8a02b-38fd-43d1-b14b-18de6d84b729",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        400,
        760
      ]
    },
    {
      "id": "35c3e7e0-50c8-4660-8e89-46849da751a9",
      "name": "Delete Github Webhook",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        900,
        760
      ]
    },
    {
      "id": "8eeb818d-9ac3-48bb-9a85-7099216bb243",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        680
      ],
      "parameters": {
        "width": 858.0344141951173,
        "height": 279.85434264975174,
        "content": "## Delete All Webhooks"
      }
    },
    {
      "id": "eb1a649a-8408-4e2f-a0a4-b9761ba8565b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        167.0254479998971,
        260
      ],
      "parameters": {
        "width": 848.6550531504272,
        "height": 283.2561904154995,
        "content": "## Register Webhooks"
      }
    },
    {
      "id": "3053ad9f-2756-4518-b17e-56a4ba8a287f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        1060
      ],
      "parameters": {
        "width": 858.0344141951173,
        "height": 279.85434264975174,
        "content": "## Handle Github Event"
      }
    },
    {
      "id": "6aca0ef9-a8d7-4e8a-a875-a0f46c624cc7",
      "name": "Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        280,
        1180
      ]
    },
    {
      "id": "72f1ac3f-4277-481d-bbc7-c5137e7ef431",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        640,
        1060
      ]
    },
    {
      "id": "85ec09d2-fccb-4669-80d1-ba3bb7ce3544",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        640,
        1260
      ]
    },
    {
      "id": "1f57a9cb-7061-4679-97ce-081746acfd55",
      "name": "Repos to Monitor",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        340
      ]
    },
    {
      "id": "6a83a757-673b-4ffc-9f91-54e5a24b8437",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        1180
      ],
      "parameters": {
        "width": 520.7636244130189,
        "height": 381.80326328628485,
        "content": "## Test\n## 1. Register Webhooks\n- In `Repos to Monitor`, add any repo you want to monitor changes for. \n- Disable `Webhook Trigger`, Click `Test Workflow` and if your Github credentials were set corre"
      }
    },
    {
      "id": "cb204806-1f7d-494a-9e0f-340b56d2dcd5",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        440
      ],
      "parameters": {
        "width": 821.1807025349485,
        "height": 693.4508863847356,
        "content": "## Setup\n## 1. Creating Credentials on Github\n#### Generate a personal access token on github by following these esteps;\n- Right hand side of page -> Settings -> scroll to bottom -> Developer Settings"
      }
    },
    {
      "id": "28bd218b-7dfb-460e-a2a8-012af08835cd",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        40,
        1180
      ]
    },
    {
      "id": "b68dff7d-f7ee-47dc-b360-08d9ea2d7f42",
      "name": "Repos to Monitor1",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        760
      ]
    },
    {
      "id": "39dd7062-bb85-4f95-90f7-47fe27a257c8",
      "name": "Get Existing Hook",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        760
      ]
    },
    {
      "id": "6d092a2f-ba48-4b0f-a772-4f55ba761d64",
      "name": "Hook URL",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        760
      ]
    }
  ],
  "connections": {
    "Fields": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hook URL": {
      "main": [
        [
          {
            "node": "Get Existing Hook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Register Github Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Hook URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Repos to Monitor": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Existing Hook": {
      "main": [
        [
          {
            "node": "Delete Github Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Repos to Monitor1": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Repos to Monitor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}