DocumentationWorkflowsApps and services
GitHub Files and Branches node
Reads and writes files, branches and commits in a repository, e.g. "What's in the README on main?" or save a file with a commit. Learn how to configure it, map inputs and outputs, run a test and resolve common errors.
10 min readUpdated
What this node does
Reads and writes files, branches and commits in a repository, e.g. "What's in the README on main?" or save a file with a commit.
Use GitHub Files and Branches as a clearly defined step in an anymize workflow.
- Processes one input.
- Provides one output for following steps.
- Runs as a regular step in the flow.
Set up the node
- 01Open a workflow and add GitHub Files and Branches from the node catalog.
- 02If your GitHub account is not connected yet, connect it right in the node panel or under Connectors.
- 03Complete the required fields and map values from previous steps.
- 04Run the node with a small test record and inspect its output.
- 05Connect the successful output and activate the workflow after an end-to-end test.
Operations and modes
Choose the required function in Action. The panel then shows the relevant settings.
- List branches
- List commits
- Read file
- Read branch
- Create branch
- Delete branch
- Read commit
- Compare versions
- Read README
- Save file
- Delete file
- Search code
- List tags
Settings
| Field | Meaning | Area |
|---|---|---|
| Action | Choices: List branches, List commits, Read file, Read branch, Create branch, Delete branch, Read commit, Compare versions, Read README, Save file, Delete file, Search code, List tags | Standard |
| Owner (user or org) | The GitHub name the repo belongs to, e.g. anymize. | Standard |
| Repository | Name of the repository, e.g. hello-world. | Standard |
| Protected branches only | Configure this value in the node panel. | Standard |
| Count (max. 100) | How many entries to load per request. No effect with "Load all pages", which always loads 100 per page. | Standard |
| Load all pages | Keeps loading pages until everything is there, up to 1000 entries. | Standard |
| Page | Which page to start from, e.g. the next page from the previous request. Empty: the first one. No effect with "Load all pages". | Standard |
| Branch | Which branch, e.g. main. | Standard |
| File path | Path in the repository, e.g. src/index.ts or README.md. | Standard |
| By person | GitHub name or email. | Standard |
| Changed since | Only entries changed since this time, e.g. 2026-01-31T00:00:00Z. | Standard |
| Changed until | Configure this value in the node panel. | Standard |
| Version (branch) | Which branch to read from, e.g. main. Pros can enter a commit hash. | Standard |
| New branch | Configure this value in the node panel. | Standard |
| Starting point | Branch, tag or commit to branch off from. Empty: the default branch. | Standard |
| Commit or branch | Configure this value in the node panel. | Standard |
| From | Older version, branch or commit. | Standard |
| To | Newer version, branch or commit. | Standard |
| Content | The new content of the file. | Standard |
| Content is provided as | Choices: Text, Base64 | Standard |
| Commit message | Briefly, what changed. | Standard |
| Previous file version | For pros only. Leave empty to detect it automatically. | Standard |
| Search term | A search word is required. Pros can use filters, e.g. repo:octocat/hello-world. | Standard |
| GitHub account | Leave empty and the step uses your connected GitHub account. | Standard |
| Run once per item | Off (default): the node runs once for the whole input. On: if it receives several items (e.g. from Split Out), it runs once PER item, and {{ $json }} is that one item each time. This is how you work through a file list entry by entry. | Standard |
| If one item fails | "Skip" writes an `error` field for the failed item and keeps processing the rest, instead of losing the whole run to a single unreadable file. | Standard |
| Pause between items (milliseconds) | Wait before every run except the first. 1000 = 1 second per item. Useful when the other side would otherwise throttle you. Maximum 300000 (5 minutes). | Standard |
Inputs and outputs
| Input | Meaning | Type |
|---|---|---|
| Standard | Receives the complete result from the previous step. | JSON |
| Output | Meaning | Type |
|---|---|---|
| Standard | Makes the result available to the next step as JSON. | JSON |
This node can process lists item by item. Error handling and the delay between items are available in advanced settings.
Example and test run
Read the README from the default branch: begin with a small, recognizable record. Inspect the output and only map fields that are present there.
Test-run example
{
"owner": "octocat",
"repo": "hello-world",
"path": "README.md"
}Access and security
The node works with your own connected GitHub account. It only sees and changes what this account is allowed to. Check the permissions shown when you connect. The matching area (Issues, Pull Requests, Repos) must also be switched on in the settings of your GitHub connection under Connectors. All areas are on by default.
"Allowed actions" in the settings of your GitHub connection under Connectors also applies to this node and is checked on every run. With "Read only" or "Read and draft", only the read actions run: List branches, List commits, Read file, Read branch, Read commit, Compare versions, Read README, Search code, List tags. These actions need "Allow changes": Create branch, Delete branch, Save file, Delete file.
Keys and credentials belong in Workflow Secrets or your connected accounts. Never paste them as plain text into workflow fields, test data or descriptions.
Troubleshooting
- No output: inspect the latest run and confirm that the previous node returned the expected fields.
- Empty variable: open the previous step output and use a field name from the real test data.
- Connection rejected: reconnect the service and grant the permissions required by this step.
- Action blocked: set "Allowed actions" of the connection under Connectors to "Allow changes", or pick a read action.
- List processed once: enable per-item execution in advanced settings.