Technical Note: [FortiSOAR / Cybersponse Tricks'n'Tips] Testing whether Steps variable is Empty before setting it
I am trying to find a record using some conditions from the emails module

In the retrieve email body step I am trying to set the variable this way

Testing whether the value includes anything and hence setting its value otherwise doing nothing.
I am facing this error

I think is caused by not finding the Required emailm however isn't the defined condition in the if condition supposed to avoid this issue?
Instead of using 'is defined' simply use this way {% if vars.steps.Copy__of_Find_Emails%} {{vars.steps.Copy__ofFind_Emails[0]}} ......
for. eg - {%if vars.result.asset_iri %} {{vars.result.asset_iri}}{%else%}None{%endif%}