Dispatch Workflow
github.dispatch_workflow
ActionBusiness appsconnection required
Calls POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches.
Start a workflow run on a branch or tag, with optional inputs.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- GitHub
- Secret shape
- the GitHub personal access token
- Resolved by
- config.connection_id, else node.connection_id, else the tenant's sole GitHub connection
Configuration
5 fields, 4 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
owner Repository owner — the user or organisation login. Supports {{ }}. | string | Yes | — | — | octocat |
repo Repository name, without the owner prefix. Supports {{ }}. | string | Yes | — | — | hello-world |
workflow_id Workflow id, or its file name such as ci.yml. | string | Yes | — | — | ci.yml |
ref Branch or tag to run the workflow on, e.g. main. | string | Yes | — | — | main |
inputs JSON object of workflow_dispatch inputs. GitHub allows at most 25 keys. | object | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"owner": "octocat",
"ref": "main",
"repo": "hello-world",
"workflow_id": "ci.yml"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
ok True when GitHub accepted the call. | boolean | true |
workflow_id The workflow that was dispatched. | string | — |
ref The ref it was dispatched on. | string | — |
run_id Id of the run GitHub started, when it reports one. | number | — |
html_url Link to the new run, when GitHub reports one. | string | — |
{
"html_url": "",
"ok": true,
"ref": "",
"run_id": 0,
"workflow_id": ""
}Notes
- The workflow must already declare a workflow_dispatch trigger on the default branch, or GitHub answers 422.
- Older responses are 204 with no body, so run_id and html_url can be null even on success — poll list_workflow_runs when you need the run.
Solutions with GitHub
See Dispatch Workflow run in a workflow.
In a technical demo we add the GitHub connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.