Skip to main content

Create Workflow Dispatch

You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.

You must configure your GitHub Actions workflow to run when the workflow_dispatch webhook event occurs. The inputs are configured in the workflow file. For more information about how to configure the workflow_dispatch event in the workflow file, see "Events that trigger workflows."

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint. For more information, see "Creating a personal access token for the command line.".

External Documentation

To learn more, visit the GitHub documentation.

Parameters

ParameterDescription
InputsInput keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when inputs are omitted.
OwnerThe account owner of the repository. The name is not case sensitive.
RefThe git reference for the workflow. The reference can be a branch or tag name.
RepoThe name of the repository. The name is not case sensitive.
Workflow IDThe ID of the workflow. You can also pass the workflow file name as a string.

Workflow Library Example

Create Workflow Dispatch with Github and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop