Blueprints

Trigger an Apache Airflow DAG run from Kestra and wait for its completion

About this blueprint

API

This flow triggers an Airflow DAG run using Kestra's Airflow plugin and waits for its completion. Under the hood, the plugin uses the Airflow REST API to trigger the DAG run and check its status.

The conf field in the request body can be used to pass extra metadata about the execution that triggered the Airflow DAG run.

The flow can be useful for users migrating to Kestra from Airflow or orchestrating workflows across both platforms.

yaml
id: airflow
namespace: company.team
tasks:
  - id: run_dag
    type: io.kestra.plugin.airflow.dags.TriggerDagRun
    baseUrl: http://host.docker.internal:8080
    dagId: example_astronauts
    wait: true
    pollFrequency: PT1S
    options:
      basicAuthUser: "{{ secret('AIRFLOW_USERNAME') }}"
      basicAuthPassword: "{{ secret('AIRFLOW_PASSWORD') }}"
    body:
      conf:
        source: kestra
        namespace: "{{ flow.namespace }}"
        flow: "{{ flow.id }}"
        task: "{{ task.id }}"
        execution: "{{ execution.id }}"

Trigger Dag Run

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra