Reuse Randomized Templated String in Automation

Hello, I have automation which in one step uses OpenAI with prompt that is templated and contains random elements to form the final prompt which gets used. All works well, however I was wondering is there a way I could access what was actually generated and use it later in the automation?

So to be precise: step one, one field is template
{%
set scenes = [
‘opt1’,
‘opt2’
]
%}

Give me {{ scenes | random }} ... blabla

and I want to then in other step be able to retrieve what was generated and for example send this by email.

I was thinking some text helper, which gets sets once a day by a time trigger? However that seems to have a limit of 255 chars, which is not enough for me.
Template sensor (if possible at all) wouldnt work because it would regenerate on every query.

Is there some recommended pattern for this please?