This section will guide you through the fundamentals of Kestra.

Flows

In Kestra, we define flows using the declarative YAML language.

We identify them by an id and a namespace. The id is a unique identifier inside the namespace, which is used to group flows. Flows can also have a description and labels.

yaml
id: kestra-tutorial
namespace: io.kestra.tutorial
labels:
  env: PRD
description: |
  # Kestra Tutorial
  As you notice, we can use markdown here.

Discover more about flows in the Flows section.

Tasks

We use Tasks to write flows. We define a Task by an id, a type, and some properties related to its type. Each Task is a step in your Flow that will execute a specific action. For example, you can use a Task to run a Python script.

yaml
tasks:
  - id: python
    type: io.kestra.core.tasks.scripts.Python
    inputFiles:
      main.py: |
        print("Hello World")

Autocompletion

Create your first Flow

Now, let's create our first Flow. On the left side of the screen, click on the Flows menu. Then, click on the Create button.

Access flow creation

Use the following Flow in the Editor, then click the Save button. This Flow will download a CSV file from the French Open Data Portal.

yaml
id: kestra-tutorial
namespace: io.kestra.tutorial
labels:
  env: PRD
description: |
  # Kestra Tutorial
  As you notice, we can use markdown here.
tasks:
  - id: download
    type: io.kestra.plugin.fs.http.Download
    uri: "https://gist.githubusercontent.com/tchiotludo/2b7f28f4f507074e60150aedb028e074/raw/6b6348c4f912e79e3ffccaf944fd019bf51cba30/conso-elec-gaz-annuelle-par-naf-agregee-region.csv"

After saving it, you will see a New Execution button. Click on it and watch your first Flow running.

New execution