Lesstep
GitHub REST API · Checked October 27, 2026

GitHub Actions: "Workflow does not have 'workflow_dispatch' trigger"

You started a workflow by hand, with the REST API, gh workflow run or a tool built on them, and GitHub answered HTTP 422 with this message. GitHub reads the workflow file as it is on the branch or tag you start it on (the ref), and in that copy the on: section has no workflow_dispatch. The copy you are looking at, often the one on the default branch, may well have it.

Where the message comes from

Why the file has no trigger, and the fix

  1. The trigger is on another branch. gh without --ref starts the workflow on the repository's default branch, so a trigger added on a feature branch and not merged yet is not there. Start it where the trigger is (gh workflow run release.yml --ref my-branch, or "ref": "my-branch" in the request), or merge the trigger. It also happens the other way round: the default branch has the trigger, and the older branch or tag you start it on does not.
  2. The default branch does not have it yet. GitHub's documentation: "This event will only trigger a workflow run if the workflow file exists on the default branch." The Run workflow button on github.com shows only when the file on the default branch has the trigger, and "Once a workflow has run at least once, you can dispatch it against any branch or tag via the GitHub API or GitHub CLI." (Events that trigger workflows)
  3. The trigger is not where GitHub looks for it. It has to be one of the events under on: at the top of the file: on: workflow_dispatch, on: [push, workflow_dispatch], or workflow_dispatch: indented one level under on:. Indented under push:, or written at the top level beside on:, it is not a trigger.
  4. GitHub has not read the file again. In one report (May 25, 2026, a repository whose fork had been made anew) GitHub gave this answer with the trigger in place, and its list of workflows showed the file's path (.github/workflows/release.yml) instead of the workflow's name:. Disabling and enabling the workflow did not help; a commit that changed one comment in the file did (the pull request). This is one report, not documented behavior.

Checking the copy GitHub reads

# the workflow file as it is on the branch or tag you start it on
gh api 'repos/<owner>/<repo>/contents/.github/workflows/release.yml?ref=my-branch' \
  -H 'Accept: application/vnd.github.raw+json'

# the workflows GitHub knows: id, name, path and state
gh api repos/<owner>/<repo>/actions/workflows \
  --jq '.workflows[] | [.id, .name, .path, .state] | @tsv'

If the first command shows no workflow_dispatch under on:, the fix is in one of the first three items above. If it does, and the second command lists the workflow under its path instead of its name, it is the fourth.

Starting workflows from IntelliJ IDEA and other JetBrains IDEs

Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs, steps and logs. Its Run Workflow reads each workflow file on the branch you have checked out (or the default branch) and offers only the ones with a workflow_dispatch trigger there, with a field for each of their inputs. Choose another branch or tag and it reads the file there again; if the trigger is missing, it says "On my-branch, this workflow has no workflow_dispatch trigger." before anything is started. Reading runs and logs is free; re-running, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).

GitHub and GitHub Actions are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc. or JetBrains.

More: "created over a month ago": running a workflow again · GitHub Actions plugins for IntelliJ IDEA compared · 日本語