This n8n workflow automates the process ofUploading multiple files to a GitHub repository using the GitHub REST API, addressing the limitation of native single-file uploads. The workflow starts with a manual trigger, allowing users to initiate the process on demand. It then sets the necessary GitHub repository information, including the personal access token, repository name, username, branch, and commit message. Next, it retrieves the latest commit SHA to base subsequent changes on, and fetches the current base tree SHA. The workflow creates a new tree object with multiple files, defining each file’s name, mode, type, and content. Subsequently, it creates a new commit referencing this tree and updates the branch to point to this latest commit. This streamlined automation is ideal for developers or teams who need to update multiple files in a repository regularly, such as deploying static sites, updating configuration files, or batch content uploads.
Automated Multi-File Upload to GitHub via n8n
Node Count | 6 – 10 Nodes |
---|---|
Nodes Used | httpRequest, manualTrigger, set, stickyNote |
Reviews
There are no reviews yet.