Skip to main content

Workflow inputs

Workflow inputs allow you to parameterize workflows with typed values. Inputs are defined at the workflow level and can be provided when the workflow is triggered manually or by schedules.

Schema

See Schema Reference for the complete #StringInput, #BoolInput, and #IntInput definitions.

Input Types

Workflows support three input types, each with type-safe default values:

  • string: Text values.
  • bool: Boolean true/false values.
  • int: Integer numeric values.

Input Definition

Inputs are defined as a map where keys are input names and values are Input objects.

Example with all types:

inputs:
model_type:
type: string
required: true
description: Type of ML model to train

debug_mode:
type: bool
default: false
description: Enable debug logging

epochs:
type: int
default: 100
description: Number of training epochs

Input Properties

Common Properties

These properties are available for all input types:

type (required)

The data type of the input.

Type: "string" | "bool" | "int"

Example:

type: string  # or bool, or int

required (optional)

Whether this input must have a value.

Type: bool

Default: false

Example:

required: true

Behavior:

  • If default is provided, the input always has a value (satisfied by the default).
  • If no default, the input must be provided by the trigger.

description (optional)

Human-readable description of the input.

Type: string

Example:

description: Model architecture (xgboost, random-forest, etc.)

String Input Specific

String inputs support an additional secret property.

secret (optional)

Whether this input contains sensitive data that should be masked in logs and UI.

Type: bool

Default: false

Only available for: type: string

Example:

inputs:
api_key:
type: string
secret: true

Type-Specific Defaults

Default values must match the input type:

String defaults:

environment:
type: string
default: "production" # String value

Boolean defaults:

dry_run:
type: bool
default: false # Boolean value (true or false)

Integer defaults:

max_retries:
type: int
default: 3 # Integer value (no quotes)

Using Inputs

Inputs are referenced in expressions as ${{ .inputs.<name> }} - see Expressions.

Type Coercion in Expressions

When inputs are used in expressions (${{ .inputs.<name> }}), they are automatically converted to strings:

See Expressions for more details on type coercion.

In Environment Variables

inputs:
model_type:
type: string
required: true

env:
MODEL_TYPE: "${{ .inputs.model_type }}"

In Shell Commands

steps:
- name: Train model
run: python train.py --model ${{ .inputs.model_type }}

In Drive Paths

upload:
path: models/
destination: "drive://bucket/${{ .inputs.model_type }}/models/"

Providing Input Values

Schedule Triggers

Schedules provide input values through the inputs field:

inputs:
dataset:
type: string
required: true

trigger:
schedule:
- cron: "0 0 * * *"
inputs:
dataset: full-training-set
- cron: "0 12 * * *"
inputs:
dataset: validation-set

Manual Triggers

Input values are provided through the trigger mechanism (UI, API, CLI) when manually starting the workflow.


Feedback