Remove octopus stack trace from email

I’m not an admin of our Octopus instance, just an end user looking for info before I reach out to others in my organization. Apologies if this is basic.

The email confirmations we get when one of our tests fail contains a lengthy Octopus stack track which, in this context, seems entirely useless. Is it a) possible to remove this from email and b) is it possible to get something more useful like the test output in the email



Hi @jransom,

Thanks for reaching out on our support forum, and welcome to the community!

Right now, there are limited options for the email notification, and while you can’t add attachments, you can provide a link in the email body to navigate to the area you want to see quickly. You can ask your Octopus admin to update the email body to include links to the project deployments so you can quickly see which deployment/test failed and why.

I hope this helps. Please let me know if you have any additional questions.


Hey @jransom,

I did think of one other thing. We have a sample Octopus instance that demos some of the capabilities with Octopus, and one has a SQL script template that inspects an artifact. You could modify that step to store the deployment info you wish in an output variable and include that in the email by printing the variable in the email step. The script is below.

$artifactUrl = "$OctopusUrl/api/$SpaceId/artifacts?take=2147483647&regarding=$DeploymentId&order=asc"
Write-Host "Getting the artifacts from $artifactUrl"
$artifactResponse = Invoke-RestMethod $artifactUrl -Headers $header
$fileListToCheck = @()

foreach ($artifact in $artifactResponse.Items)
    $fileName = $artifact.Filename

    if ($fileName.EndsWith($FileExtension))
        Write-Host "The artifact is a SQL Script, downloading"
        $artifactId = $artifact.Id
        $artifactContentUrl = "$OctopusUrl/api/$SpaceId/artifacts/$artifactId/content"
        Write-Host "Pulling the content from $artifactContentUrl"
        $fileContent += Invoke-RestMethod $artifactContentUrl -Headers $header
        Write-Host "Finished downloading the file $fileName"
        $sqlFileToCheck = @{
        	FileName = $fileName;
            Content = $fileContent;
        $fileListToCheck += $sqlFileToCheck                

That section comes from lines 8-42 of this step - Octopus Deploy.

I hope this helps.


Thanks Brent, I will look into this info.

1 Like

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