New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger an Apache Airflow DAG from Kestra over the REST API, wait for completion, and pass Kestra execution metadata into the DAG run for end-to-end lineage.
Trigger an Apache Airflow DAG run directly from Kestra, wait for it to complete, and capture its final state. This blueprint calls the Airflow REST API with basic authentication, so you can drive existing Airflow DAGs from a Kestra flow without rewriting them. It solves the common migration and coexistence problem of running Kestra and Airflow side by side: Kestra becomes the control plane that launches, waits on, and reacts to Airflow workloads while passing its own execution metadata into each run for full cross-platform lineage.
dag_id input sets which DAG to trigger (default example_astronauts), so the same flow can target any DAG without editing tasks.trigger_dag task of type io.kestra.plugin.airflow.dags.TriggerDagRun posts a DAG run request to the Airflow REST API at baseUrl, authenticating with basicAuthUser and basicAuthPassword.wait: true with pollFrequency: PT1S makes Kestra block and poll the run every second until Airflow reports a terminal state.body.conf injects Kestra context (source, namespace, flow, task, execution) into the DAG run, so each Airflow run records exactly which Kestra execution launched it.{{ outputs.trigger_dag.dagId }}, {{ outputs.trigger_dag.dagRunId }}, and {{ outputs.trigger_dag.state }}.Airflow's own scheduler is built around time-based DAG schedules and cannot easily start a DAG from arbitrary external events, downstream flows, or other tools. With Kestra you wrap the DAG trigger in declarative YAML, launch it from event triggers, webhooks, or upstream flows, add retries and timeouts, and capture structured outputs for the rest of your pipeline. The injected conf metadata gives you lineage across both platforms, which a standalone Airflow deployment does not provide.
AIRFLOW_BASE_URL: base URL of the Airflow instance (for example http://airflow:8080).AIRFLOW_USERNAME: Airflow basic auth username.AIRFLOW_PASSWORD: Airflow basic auth password.AIRFLOW_BASE_URL, AIRFLOW_USERNAME, and AIRFLOW_PASSWORD secrets to your Kestra instance.dag_id or setting your own DAG ID.state is success and note the returned dagRunId.Schedule or webhook trigger to launch the DAG on a cadence or external event instead of manually.{{ outputs.trigger_dag.state }} to send alerts or run cleanup only on success or failure.body.conf with more inputs to pass run-specific configuration into the DAG.retry and timeout properties to the trigger_dag task to harden long-running runs.