title: Airflow 2.1.0 passing variable to another DAG using TriggerDagRunOperator
body: <p>We're using Airflow 2.1.0 and want to trigger a DAG and pass a variable to it (an S3 file name) using TriggerDagRunOperator.</p>
  <p>I've found examples of this and can pass a static JSON to the next DAG using conf:</p>
  <pre><code>    @task()
      def trigger_target_dag_task(context):
          TriggerDagRunOperator(
              task_id=&quot;trigger_target_dag&quot;,
              trigger_dag_id=&quot;target_dag&quot;,
              conf={&quot;file_name&quot;: &quot;test.txt&quot;}
          ).execute(context)
  </code></pre>
  <p>However, I cannot find current examples where the conf is dynamically created without using python_callable - this seems close:</p>
  <p><a href="https://stackoverflow.com/questions/67941237/airflow-2-0-0-pass-a-dynamically-generated-dictionary-to-dag-triggered-by-tri/67941545#67941545">Airflow 2.0.0+ - Pass a Dynamically Generated Dictionary to DAG Triggered by TriggerDagRunOperator</a></p>
  <p><a href="https://github.com/apache/airflow/pull/6317#issuecomment-859556243" rel="nofollow noreferrer">https://github.com/apache/airflow/pull/6317#issuecomment-859556243</a></p>
  <p>Is this possible?</p>
  <p><strong>Updated question:</strong></p>
  <p>This method did not work when I used:</p>
  <pre><code>    @task()
      def trigger_dag_task(context):
          TriggerDagRunOperator(
              task_id=&quot;trigger_dag_task&quot;,
              trigger_dag_id=&quot;target_dag&quot;,
              conf={&quot;payload&quot;: &quot;{{ ti.xcom_pull(task_ids='extract_rss') }}&quot;},
          ).execute(context)
  </code></pre>
  <p>The target_dag received the conf as a string:</p>
  <pre><code>{logging_mixin.py:104} INFO - Remotely received value of {{ ti.xcom_pull(task_ids='extract_rss') }}
  </code></pre>