Skip to main content

Github webhook-based n8n workflow import template

Workflow preview

Workflow preview
100%
Github webhook-based n8n workflow import template preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n workflow template uses community nodes and is only compatible with the self hosted version of n8n. This template aims to ease the process of deploying workflows from github. It has a compa...

Best for

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

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.noop, n8n-nodes-base.executecommand, n8n-nodes-base.stickynote, n8n-nodes-base.github, n8n-nodes-base.splitinbatches, n8n-nodes-base.if, n8n-nodes-base.readwritefile

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Github webhook-based n8n workflow import template
Workflow name
Github webhook-based n8n workflow import template

This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n.

This template aims to ease the process of deploying workflows from github. It has a companion repository that developers might find useful{. See below for more details

How it works

Automatically import and deploy n8n workflows from your GitHub repository to your production n8n instance using a secured webhook-based approach. This template enables teams to maintain version control of their workflows while ensuring seamless deployment through a CI/CD pipeline.

  1. Receives webhook notifications from GitHub when changes are pushed to your repository
  2. Lists all files in the repository and filters for .json workflow files
  3. Downloads each workflow file and saves it locally
  4. Imports all workflows into n8n using the CLI import command
  5. Cleans up temporary files after successful import

To trigger the deployment, send a POST request to your webhook with the set up credentials (basic auth) with the following body:

{
  "owner": "GITHUB_REPO_OWNER_NAME",
  "repository": "GITHUB_REPOSITORY_NAME"
}

Set up steps

Once importing this template in n8n :

  1. Setup the webhook basic auth credentials
  2. Setup the github credentials
  3. Activate the workflow !

Companion repository

There is a companion repository located at https://github.com/dynamicNerdsSolutions/n8n-git-flow-template that has a Github action already setup to work with this workflow.

It provides a complete development environment with:

  • Local n8n instance via Docker
  • Automated workflow export and commit scripts
  • Version control integration
  • CI/CD pipeline setup

This setup allows teams to maintain a clean separation between development and production environments while ensuring reliable workflow deployment.

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

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

Block 2 - No Operation, do nothing

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

Block 3 - create workflows sub folder if not exist

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

Block 4 - Sticky Note

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

Block 5 - List files from specified repo root

Type / Role
n8n-nodes-base.github - github
Config choices
Version 1.1

Block 6 - Loop Over Files

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 7 - If it is a json file

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

Block 8 - Download file

Type / Role
n8n-nodes-base.github - github
Config choices
Version 1.1

Block 9 - Store file locally

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

Block 10 - Call n8n import and cleanup folder

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

3. Summary Table

Workflow Github webhook-based n8n workflow import template
Complexity intermediate
Nodes 10
Categories DevOps
Author Dave Bernier
Published 28 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4471/4471.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 Github webhook-based n8n workflow import template do?

This n8n workflow template uses community nodes and is only compatible with the self hosted version of n8n. This template aims to ease the process of deploying workflows from github. It has a compa...

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.