workflows.fit
Back to n8n workflows
n8n templateFreeBy Custom Workflows AI

Push multiple files to GitHub repository via Github REST API

Introduction This workflow offers a streamlined solution for uploading multiple files to a GitHub repository simultaneously using GitHub's REST API. It addresses a significant limitation of n8n's native GitHub node, w...

DevelopmentCore NodesHttp RequestManual TriggerSetSticky Note
Loading interactive preview...

Template notes

Introduction This workflow offers a streamlined solution for uploading multiple files to a GitHub repository simultaneously using GitHub's REST API. It addresses a significant limitation of n8n's native GitHub node, which only supports single-file uploads at a time. By leveraging GitHub's Git Data API, this workflow creates a new Git tree containing multiple files, commits this tree, and updates the target branch—all in a single automated process.

The workflow is particularly valuable for automation scenarios that require batch file operations, such as deploying website updates, publishing documentation, or maintaining configuration files across repositories. It eliminates the need for multiple separate API calls when working with multiple files, making your automation more efficient and less prone to partial update issues.

By abstracting the complexities of GitHub's Git Data API into a reusable workflow, it provides a practical solution for developers, content managers, and DevOps professionals who need to programmatically manage repository content at scale.

Who is this for? This workflow is designed for:

- Developers and DevOps engineers who need to automate file updates in GitHub repositories - Content managers who regularly publish multiple files to GitHub-hosted websites or documentation - Automation specialists looking to integrate GitHub operations into larger workflows - Teams using n8n for CI/CD processes who need to push code or configuration changes

Users should have basic familiarity with GitHub concepts (repositories, branches, commits) and should be comfortable obtaining and using GitHub Personal Access Tokens. While the workflow handles the API complexity, users should understand the fundamentals of version control to effectively utilize and customize it.

What problem is this workflow solving? This workflow addresses several key challenges:

1. Limited batch operations: n8n's native GitHub node only supports uploading one file at a time, making multi-file operations cumbersome and inefficient.