Blueprints

Getting started with Kestra — a Hello World Example

About this blueprint

Getting Started Inputs Outputs Schedule

This flow is a simple example of a Kestra flow. It takes a user input and logs a welcome message.

The flow has three tasks:

  1. The first task outputs two values.
  2. The second task runs a shell command and returns a value.
  3. The third task logs a welcome message using the values from the first and second tasks.

Finally, the flow has a Schedule trigger that runs the flow every day at 9 o'clock, the trigger is disabled.

yaml
id: hello_world
namespace: tutorial
description: Hello World

inputs:
  - id: user
    type: STRING
    defaults: Rick Astley

tasks:
  - id: first_task
    type: io.kestra.plugin.core.debug.Return
    format: thrilled

  - id: second_task
    type: io.kestra.plugin.scripts.shell.Commands
    commands:
      - sleep 0.42
      - echo '::{"outputs":{"returned_data":"mydata"}}::'

  - id: hello_world
    type: io.kestra.plugin.core.log.Log
    message: |
      Welcome to Kestra, {{ inputs.user }}! 
      We are {{ outputs.first_task.value}} to have You here!

triggers:
  - id: daily
    type: io.kestra.plugin.core.trigger.Schedule
    disabled: true
    cron: "0 9 * * *"

Return

Commands

Log

Schedule

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra