Skip to main content

Monitor GitHub repo access and push events with GitHub and Slack alerts

Workflow preview

Workflow preview
100%
Monitor GitHub repo access and push events with GitHub and Slack alerts preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Monitor GitHub Repositories for Unauthorized Actions How it works: This workflow monitors GitHub for high risk activities to ensure that only authorized users can modify the repository. It periodic...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.code, n8n-nodes-base.datatable, n8n-nodes-base.httprequest, n8n-nodes-base.switch, n8n-nodes-base.if, n8n-nodes-base.stickynote, n8n-nodes-base.slack

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Monitor GitHub repo access and push events with GitHub and Slack alerts
Workflow name
Monitor GitHub repo access and push events with GitHub and Slack alerts

Monitor GitHub Repositories for Unauthorized Actions

How it works:

This workflow monitors GitHub for high-risk activities to ensure that only authorized users can modify the repository. It periodically polls GitHub for events such as PushEvent, MemberEvent, and PublicEvent.

For each event, the workflow extracts the username of actor and looks it up in the it_whitelist data table to determine the user’s role. A Switch node then routes the event to the appropriate validation logic.

• Member & Public events: Only users with the admin role are allowed. Any non-admin action such as adding a repository member or changing a private repository to public triggers an alert. • Push events: The user must exist in the whitelist. If no role is found, the user is treated as unknown and flagged.

All unauthorized actions are reported to Slack, including the event type, actor name, and repository details.

Setup steps:

Credentials: Connect your GitHub Personal Access Token and Slack Bot Token.

Create a Data Table named it_whitelist with columns github_username and role. Add your GitHub username with the role admin to prevent self-alerts. Accordingly, add other developers and members in your organization with appropriate roles to white list them.

Switch Configuration: Use the expression {{ $item.json.type }} in 'Rules' mode to route events.

Logic: Configure the PushEvent IF node to flag users whose role is empty or missing. Configure the Member and Public IF nodes to flag users whose role is not admin.

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 - Schedule

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

Block 2 - Filter Member Events

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

Block 3 - Check Whitelist

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

Block 4 - Github Events (HTTP)

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

Block 5 - Switch

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

Block 6 - PublicEvent

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 7 - PushEvent

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 8 - MemberEvent

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 9 - Sticky Note

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

Block 10 - Push Event Alert

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

Block 11 - Public Event Alert

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

Block 12 - Member Event Alert

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

Block 13 - Sticky Note1

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

Block 14 - Sticky Note3

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

Block 15 - No Operation, do nothing

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

Block 16 - Sticky Note4

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

3. Summary Table

Workflow Monitor GitHub repo access and push events with GitHub and Slack alerts
Complexity advanced
Nodes 16
Categories SecOps
Author RamS
Published 31 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12336/12336.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 GitHub repo access and push events with GitHub and Slack alerts do?

Monitor GitHub Repositories for Unauthorized Actions How it works: This workflow monitors GitHub for high risk activities to ensure that only authorized users can modify the repository. It periodic...

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 SecOps use case.