GitHub
GitHub operations — create issues and pull requests, comment on issues, list repositories, and read or write files via the GitHub REST API.
Use GitHub when you need to automate repository workflows:
- Create issues or pull requests from webhook or form data
- Comment on existing issues or PRs with review feedback or bot replies
- List repositories accessible to your token
- Read or write files in a repository (e.g. config updates, generated docs)
Connect a GitHub node to an AI Agent Tools handle to let the agent interact with your repositories on demand.
| Handle | Type | Description |
|---|---|---|
input | any | Upstream data for {{ input.field }} template references in settings. |
| Handle | Type | Description |
|---|---|---|
result | object | GitHub operation result |
The result (accessed as {{ github.* }}) shape:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the operation succeeded |
url | string | URL to the created resource (issue, PR, or file) when applicable |
data | object | Raw GitHub API response payload |
error | string | Error message if success is false |
{
"success": true,
"url": "https://github.com/owner/repo/issues/42",
"data": { "number": 42, "title": "Bug report", "state": "open" },
"error": null
}
Each node run executes a single operation. Set Operation, then configure the fields shown for that operation.
| Setting | Type | Default | Description |
|---|---|---|---|
operation | enum | create_issue | GitHub action to perform: create_issue, comment_on_issue, create_pr, list_repos, get_file, or create_or_update_file. |
| Setting | Type | Default | Description |
|---|---|---|---|
allowed_operations | multi-select | All operations | Which operations are available when this plugin is used as an AI agent tool. Excluded from the tool schema — the agent can only invoke operations in this list. |
Shown when operation is create_issue, comment_on_issue, create_pr, get_file, or create_or_update_file:
| Setting | Type | Default | Description |
|---|---|---|---|
owner | string | — | Repository owner (user or organization). Supports {{ }} bindings. |
repo | string | — | Repository name. Supports {{ }} bindings. |
Shown when operation is create_issue:
| Setting | Type | Default | Description |
|---|---|---|---|
title | string | — | Issue title. Supports {{ }} bindings. |
body | code editor | — | Issue body (Markdown). Supports {{ }} bindings. |
labels | string | — | Comma-separated label names. Supports {{ }} bindings. |
Shown when operation is comment_on_issue:
| Setting | Type | Default | Description |
|---|---|---|---|
issue_number | number | — | Issue number to comment on. Supports {{ }} bindings. |
body | code editor | — | Comment body (Markdown). Supports {{ }} bindings. |
Shown when operation is create_pr:
| Setting | Type | Default | Description |
|---|---|---|---|
title | string | — | Pull request title. Supports {{ }} bindings. |
body | code editor | — | Pull request description. Supports {{ }} bindings. |
head_branch | string | — | Source branch containing your changes. Supports {{ }} bindings. |
base_branch | string | main | Target branch. Supports {{ }} bindings. |
No additional settings beyond Operation and Agent Permissions. Lists repositories accessible to the authenticated token.
Shown when operation is get_file:
| Setting | Type | Default | Description |
|---|---|---|---|
file_path | string | — | Path to the file in the repo (e.g. src/index.ts). Supports {{ }} bindings. |
Shown when operation is create_or_update_file:
| Setting | Type | Default | Description |
|---|---|---|---|
file_path | string | — | Path for the file in the repo. Supports {{ }} bindings. |
file_content | code editor | — | File content to write. Supports {{ }} bindings. |
commit_message | string | — | Commit message for the change. Supports {{ }} bindings. |
Configure on the Environment Variables page:
| Variable | Description |
|---|---|
GITHUB_TOKEN | GitHub Personal Access Token (e.g. ghp_...). Create one at GitHub token settings. Typically requires repo scope for private repositories or public_repo for public repos only. |
Create a GitHub issue from a webhook payload:
Webhook Trigger → GitHub (create_issue)
GitHub settings:
- Operation:
create_issue - Owner:
my-org - Repository:
my-repo - Title:
{{ webhook.body.title }} - Body:
Reported by {{ webhook.body.user }}\n\n{{ webhook.body.description }} - Labels:
bug,automated
Access the result downstream:
{{ github.success }}
{{ github.url }}
{{ github.data.number }}
Read a config file and branch on errors:
Manual Trigger → GitHub (get_file) → If ({{ github.success }})
→ true: Transform
→ false: (connect GitHub On Error output to a notification node)
Enable the On Error control output on the GitHub node to route API failures without stopping the entire workflow.
import webhook from @tensorify/webhook-trigger:4.0.0
import github from @tensorify/github:1.0.0
node trigger @tensorify/webhook-trigger:4.0.0 {
path = "/bug-reports"
method = "POST"
}
node create_issue @tensorify/github:1.0.0 {
operation = "create_issue"
owner = "my-org"
repo = "my-repo"
title = "{{ webhook.body.title }}"
body = "{{ webhook.body.description }}"
labels = "bug,automated"
}
trigger.payload -> create_issue.input
GitHub has a hidden On Error control output branch (error). Enable it via the "Error output handle" toggle at the bottom of the settings panel.
The error branch fires when the GitHub API returns an error or the request fails at runtime. On the main path, failures are also reflected in {{ github.success }} and {{ github.error }} on the result output — connect the error branch to handle failures without relying on downstream If nodes.
- Token scopes: Private repo operations require a token with
reposcope.list_reposreturns only repositories the token can access. - File writes commit directly:
create_or_update_filecommits to the default branch — there is no branch selector. Use with care in production repos. - Check
github.success: The node completes on the main output even when the API call fails. Use an If node or the On Error branch to handle failures. - Agent permissions: Restrict Allowed Operations (Agent) to prevent an AI agent from performing destructive actions like
create_or_update_file. - Missing
GITHUB_TOKEN: If the env var is not set, the node fails at runtime with an authentication error.
- Webhook Trigger — receive GitHub webhook events with built-in signature verification
- AI Agent — connect GitHub as an agent tool
- If — branch on
{{ github.success }} - Environment Variables — store your
GITHUB_TOKEN
