Skip to main content

Monitor multiple Github repos via webhook

Workflow preview

Workflow preview
100%
Monitor multiple Github repos via webhook preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

What this workflow does This workflow allows you to monitor multiple Github repos simultaneously without polling due to use of Webhooks. It programmatically allows for adding and deleting of repos ...

Best for

  • DevOps automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.stickynote, n8n-nodes-base.splitout, n8n-nodes-base.httprequest, n8n-nodes-base.set, n8n-nodes-base.slack, n8n-nodes-base.telegram, n8n-nodes-base.webhook

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jay Hartley.

Original n8n.io source

1.1 Workflow description

Title
Monitor multiple Github repos via webhook
Workflow name
Monitor multiple Github repos via webhook

What this workflow does

This workflow allows you to monitor multiple Github repos simultaneously without polling due to use of Webhooks. It programmatically allows for adding and deleting of repos to your watchlist to make management convenient.

Description

  • Can monitor multiple repos simultaneously.
  • Programmatically register or unregister repos from a list. No need for manual work.
  • Webhook notification means no constant polling necessary.

Setup

1. Creating Credentials on Github

Generate a personal access token on github by following these esteps;

  • Right hand side of page -> Settings -> scroll to bottom -> Developer Settings > Personal Access Token > Tokens (classic) > Generate New Token
  • Give scopes: admin:repo_hook repo (if you want to use it for your own private repo)

if you need more help, see here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens

2. Setting Credentials in n8n

In Register Github Webhook Authenticaion > Generic Credential Type Generic Auth Type > Header Auth Header Auth > Create New Credential with Name set to 'Authorization' and Value set to 'Bearer '. (You can reuse this for Delete Github Webhook and Get Existing Webhooks). Now in Register Github Webhook, scroll down to Send Body > JSON and inside the JSON, change the value of "url" to the webhook address given as Production URL in the node Webhook Trigger.

3. Notification settings

In the third row, link up the Webhook Trigger to any API of your choice. Slack and Telegram are given as examples. You can also format the notification message as you wish.

Setup time: roughly 10 minutes.

Instructions Video:

https://vimeo.com/1013473758

Test

1. Register Webhooks

  • In Repos to Monitor, add any repo you want to monitor changes for.
  • Disable Webhook Trigger, Click Test Workflow and if your Github credentials were set correctly, it will automatically register the webhooks. - You can test this by running the single node Get Existing Webhook and confirming it outputs the repo addresses.

2. Handle Github Events

  • Now that you have registered the webhooks, re-enable Webhook Trigger and activate the workflow.
  • Make a commit to any of the registered repos.
  • Confirm that the notification went through. That's it!

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 4 - Register Github Webhook

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Split Out1

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - Delete Github Webhook

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Notify Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.1

Block 12 - Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Repos to Monitor

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Webhook Trigger

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 17 - Repos to Monitor1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Get Existing Hook

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Hook URL

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

3. Summary Table

Workflow Monitor multiple Github repos via webhook
Complexity advanced
Nodes 19
Categories DevOps
Author Jay Hartley
Published 27 Sept 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2435/2435.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Monitor multiple Github repos via webhook do?

What this workflow does This workflow allows you to monitor multiple Github repos simultaneously without polling due to use of Webhooks. It programmatically allows for adding and deleting of repos ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.