Manual triggers
Manual triggers run workflows on-demand through the UI or API. They require explicit user action to start a workflow. Use manual triggers for testing, one-off tasks, administrative actions, or workflows that require a human decision to start.
To define a manual trigger, use the following syntax:
triggers:
- type: manual
This allows you to run a workflow manually by:
- Clicking Run in the Workflows UI
- Calling the workflow execution API, either directly or from an external system
Manual triggers can accept input parameters, which you can reference in any step. When you define inputs at the workflow level, users are prompted to provide values when they run the workflow.
Refer to Pass data and handle errors > Choose between constants and inputs to learn when to use inputs or constants in workflows.
The location of inputs in the YAML depends on your version. On stack 9.4 and earlier, inputs sits at the top level of the workflow. On stack 9.5+ and on serverless, inputs sits inside the manual trigger. Refer to Workflow anatomy for the full reference.
name: Manual Processing Workflow
inputs:
- name: environment
type: string
required: true
default: "staging"
description: "Target environment for processing"
- name: batchSize
type: number
required: false
default: 100
description: "Number of records to process"
- name: dryRun
type: boolean
required: false
default: true
description: "Run in test mode without making changes"
triggers:
- type: manual
steps:
- name: validateInputs
type: console
with:
message: |
Starting workflow with:
- Environment: {{ inputs.environment }}
- Batch Size: {{ inputs.batchSize }}
- Dry Run: {{ inputs.dryRun }}
name: Manual Processing Workflow
triggers:
- type: manual
inputs:
- name: environment
type: string
required: true
default: "staging"
description: "Target environment for processing"
- name: batchSize
type: number
required: false
default: 100
description: "Number of records to process"
- name: dryRun
type: boolean
required: false
default: true
description: "Run in test mode without making changes"
steps:
- name: validateInputs
type: console
with:
message: |
Starting workflow with:
- Environment: {{ inputs.environment }}
- Batch Size: {{ inputs.batchSize }}
- Dry Run: {{ inputs.dryRun }}