Microsoft Teams - Post a message link error

https://library.octopus.com/step-templates/110a8b1e-4da4-498a-9209-ef8929c31168

I’m successfully getting deployment messages into Teams, however the url has an extra slash in it: http://server//app#/Spaces-1/deployments/Deployments-9999

Dumping the variables show this:
[Octopus.Web.BaseUrl] = ‘http://server
[Octopus.Web.DeploymentLink] = ‘/app#/Spaces-1/deployments/Deployments-9999’

So the default message body is throwing in an extra /. Is this unique to my installation? (i.e. most don’t have the leading slash on the Deployment Link?)

Hi @seanl,

Thanks for getting in touch! The leading slash on the value of the Octopus.Web.DeploymentLink variable is normal and expected, so I can see why it’s doubling up the slashes in the step template. i.e. the message body of the template is Body = For more information, please see [deployment details](#{Octopus.Web.BaseUrl}/#{Octopus.Web.DeploymentLink})!.

This would need to be fixed by removing the slash from the step template, but that would require you to save it as a copy and re-add it to your project. You can also manually build up this Octopus.Web.DeploymentLink variable to remove the slash which then should evaluate to the URL correctly.

I also raised a pull request to change the source code directly on this community step template to remove the slash in the message body, so I’m hoping that change is applied in the near future. :slight_smile:

I hope that helps, and please let us know if we can help with anything else moving forward!

Best regards,

Kenny