Reference for the n8n GitHub node -- operations, authentication, required scopes, and common patterns.
The GitHub node interacts with the GitHub API to manage repositories, issues, pull requests, releases, and users. It is used in DevOps and project management workflows to automate issue triage, release tracking, and repository administration.
Two credential types are supported:
| Method | When to Use |
|---|---|
| GitHub OAuth2 API | Interactive flows where users authorize access. Best for multi-user or team setups. |
| GitHub Personal Access Token | Simple, single-user automation. Generate a token at github.com/settings/tokens. |
Required token scopes (Personal Access Token -- classic):
| Scope | Required For |
|---|---|
repo |
Full access to repositories (issues, PRs, code, commits) |
read:org |
Listing organization members and teams |
read:user |
Reading user profile data |
workflow |
Triggering and managing GitHub Actions workflows |
Note
For fine-grained personal access tokens, grant permissions per-repository instead of using broad scopes. Select Read and write for Issues, Pull Requests, and Contents as needed.
| Resource | Operation | Description |
|---|---|---|
| Issue | Create | Open a new issue |
| Issue | Edit | Update title, body, labels, or assignees |
| Issue | Get | Retrieve a single issue by number |
| Issue | List | List issues with optional filters (state, labels, assignee) |
| Issue | Lock | Lock an issue from further comments |
| Issue | Add Comment | Post a comment on an issue |
| Pull Request | Create | Open a new PR from a head branch to a base branch |
| Pull Request | Get | Retrieve PR details |
| Pull Request | List | List PRs with optional filters |
| Pull Request | Merge | Merge a PR |
| Repository | Get | Retrieve repository metadata |
| Repository | List | List repositories for a user or organization |
| Commit | List | List commits on a branch |
| Release | Create | Publish a new release |
| Release | Get | Retrieve a release by tag |
| User | Get | Retrieve user profile information |
| File | Get | Download a file from a repository |
| File | Create | Create or update a file in a repository |
| Parameter | Description |
|---|---|
| Repository Owner | GitHub username or organization name (e.g., n8n-io). |
| Repository Name | Repository name (e.g., n8n). |
| Issue / PR Number | Numeric identifier for the target issue or pull request. |
| Title | Title for new issues or pull requests. |
| Body | Markdown-formatted description body. |
| Labels | Comma-separated list of label names to apply. |
| Assignees | Comma-separated list of GitHub usernames. |
| Base Branch | For PRs -- the branch you are merging into (e.g., main). |
| Head Branch | For PRs -- the branch containing your changes. |
Create issues from external data:
Webhook --> Code (transform) --> GitHub (Create Issue)
Receive form submissions or alerts via a Webhook node, transform the payload into a title and body, and create a GitHub issue automatically.
Daily stale issue report:
Schedule Trigger --> GitHub (List Issues) --> IF (older than 30 days) --> Slack (Send Message)
List open issues on a schedule, filter for stale ones using a date comparison, and post a summary to Slack.
Auto-label new issues by content:
GitHub Trigger (issue opened) --> IF (body contains "bug") --> GitHub (Edit Issue, add label)
Use the GitHub Trigger node to listen for new issues, inspect the body with an IF or Code node, and add labels programmatically.
Warning: Rate limits
The GitHub API allows 5,000 requests per hour for authenticated users and only 60 for unauthenticated requests. Workflows that loop through many repositories or issues can exhaust this limit quickly. Check the
X-RateLimit-Remainingheader in the response or add delays between calls.
repo scope is broad. It grants read and write access to all repositories the user can access. For tighter control, use fine-grained tokens scoped to specific repositories.https://github.yourcompany.com/api/v3).HttpRequestError: Resource not found (404) when creating an issue.
The repository owner or repository name is incorrect, or the authenticated user does not have access to the repository. Double-check spelling and case. If using a fine-grained personal access token, confirm it has been granted access to the specific repository.
Validation Failed: {"resource":"Label","code":"invalid"} when creating an issue with labels.
The label you specified does not exist on the repository. Labels must be created before they can be applied to issues. Create the label manually in the repository's Labels settings or via the GitHub API first.
API rate limit exceeded (403) during bulk operations.
GitHub allows 5,000 authenticated requests per hour. Workflows that loop through many repositories or paginate large issue lists can exhaust this limit. Add a Wait node between iterations, reduce polling frequency, or use conditional checks to limit the number of API calls.
I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.