It works now. Thank you for your help and this quick return 🙂
________________________________ De : Kaxil Naik <[email protected]> Envoyé : mardi 3 mars 2020 12:46 À : [email protected] <[email protected]> Objet : Re: Use a variable generated in a python function in a mail operator You will need to use Xcom<https://airflow.apache.org/docs/stable/concepts.html?highlight=xcom#xcoms>. Pass provide_context=True in PythonOperator ( creation_ticket task) and use the following in html_content in EmailOperator( email task): html_content = "<h3> Numberos des oceanes generess</h3> {{ ti.xcom_pull(task_ids='creationticket') }}" Regards, Kaxil On Tue, Mar 3, 2020 at 11:01 AM Achille B <[email protected]<mailto:[email protected]>> wrote: Good morning everyone, I would like to use the "listeticketid" variable, variable returned by python function: creationticket in the EmailOperator. I tried like this but it didn't work, would you have an idea how to solve my problem please? [cid:170a035024dcb971f161] Thanks in advance
