Send an Email - HTML with variables

I am having an issue with the ‘Send an Email’ step. I would like to send an email and take advantage of the markdown rendering of the release notes in the email body, so I have set it to be an HTML email with the following definition:

<p>[Insert some copy here] version #{Octopus.Release.Number} [More copy]</p>
<p>A summary of the changes:</p>
#{unless Octopus.Action[Step1].IsSkipped}<li>Product 1: #{Octopus.Action[Step1].Package.PackageVersion}</li>#{/unless}
#{unless Octopus.Action[Step2].IsSkipped}<li>Product 2: #{Octopus.Action[Step2].Package.PackageVersion}</li>#{/unless}
#{Octopus.Release.Notes | Markdown}

If it matters, the project is a series of ‘Deploy a release’ steps, and this email would go out at the end of the process.
The resulting email shows all the raw Octopus placeholders (even #{Octopus.Release.Notes | Markdown}, which technically isn’t inside any HTML tag) .

If I remove the HTML tags, then all the placeholders are resolved as expected, but it looks terrible because there’s no real HTML except for the markdown rendering of the release notes.

Is this a bug, or is there something else that needs to be done for this to work?

Nevermind, I found the issue. Apparently on some of my lines I was missing the closing } for the octopus variable. When I fixed it, everything appears to work correctly.


Thanks for getting in touch! That’s great to hear you found the solution here. Please don’t hesitate to reach out if you have any further questions going forward. :slight_smile:

Kind regards,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.