Inputs allow you to make your flows more dynamic and reusable. Instead of hardcoding values in your flow, you can use inputs to make your workflows more adaptible to change.

How to retrieve inputs

Inputs can be accessed in any task using a special {{ inputs.input_name }} variable.

Defining inputs

Similarly to tasks, inputs is a list of key-value pairs. Each input must have a name and a type. You can also set defaults for each input. Setting default values for an input is always recommended, especially if you want to run your flow on a schedule.

To reference an input value in your flow, use the {{ inputs.input_name }} syntax.

id: inputs_demo
namespace: dev

  - name: user
    type: STRING
    defaults: Rick Astley

  - id: hello
    type: io.kestra.core.tasks.log.Log
    message: Hey there, {{ inputs.user }}

Try running the above flow with different values for the user input. You can do this by clicking on the New execution button in the UI and then typing the desired value in the menu.


Here are the most common input types:

STRINGIt can be any string value. Strings are not parsed, they are passed as-is to any task that uses them.
INTIt can be any valid integer number (without decimals).
BOOLEANIt must be either true or false.

Check the inputs documentation for a full list of supported input types.

Parametrize your flow

In our example, we will provide the URL of the API as an input. This way, we can easily change the URL when calling the flow without having to modify the flow itself.

id: getting_started
namespace: dev

  - name: api_url
    type: STRING

  - id: api
    type: io.kestra.plugin.fs.http.Request
    uri: "{{ inputs.api_url }}"