Kick off an Apache Airflow DAG from n8n, wait while it runs, and return a task result when it finishes. Great for data and IT teams that want a no code way to control pipelines and share results with other apps. Saves time and keeps people out of the Airflow UI.
The flow starts with input values for the DAG id, the task id, the config, and timing settings. n8n posts to the Airflow API to create a run with your config. If the run is queued, it pauses for a set number of seconds and tries again. A counter tracks attempts and stops with a clear error when the wait limit is reached. When the state turns to success, it reads the XCom value from the chosen task and passes it back. If the run fails, it stops with a short error so you know what happened. All calls use basic auth against your Airflow base URL.
Setup is simple. You need an Airflow user with API access, the base URL, and a Basic Auth credential in n8n Cloud. Provide dag_id, task_id, and conf in the input or from a parent workflow. Pick wait and wait_time to match your pipeline speed. Expect faster handoffs, less screen watching, and a clean result object you can route to Slack, databases, or other jobs.