Glad I was able to help. On Tue, Mar 3, 2020 at 1:15 PM Achille B <[email protected]> wrote:
> 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]> 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? > > > > Thanks in advance > >
