If condition in email template for environemnt

Hi,

I want to do something like below.

If environment = QA
QA Deployment was approved by #{Octopus.Action[QA Approval].Output.Manual.ResponsibleUser.DisplayName} with comments '#{Octopus.Action[QA Approval].Output.Manual.Notes}'
End if

I tried something like below, however it did not work.

#{if #{Octopus.Action[QA Approval].Output.Manual.ResponsibleUser.DisplayName}

QA Deployment Approval

QA Deployment was approved by #{Octopus.Action[QA Approval].Output.Manual.ResponsibleUser.DisplayName} with comments ‘#{Octopus.Action[QA Approval].Output.Manual.Notes}’ {/if}

Could you please help me, what I am doing wrong here?

Thanks,
Nachiket

Hi Nachiket,

Thanks for getting in touch!

The conditionals are for variable replacement in the next, it’s not a full conditional logic.
Your best option for what you’re trying to achieve is to have an email step that only runs in QA, then keep your formatting simple.

Hope that helps!

Damian