Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Webhook to Slack from Jira

Mark Trochym October 4, 2022

I have been sending the description field, using Jira automation via a webhook from Jira to Slack channel. But the problem I have noticed is that when a url is in the description field, using {{issue.description}} in the automation passes BOTH the link address and the text address. 

image.png

 

So in my slack channel shows both. Ex:

 

Please click here: [https://www.something.com/path/Q013R29S6VEG7V%7Chttps://www.something.com/path/Q013R29S6VEG7V]

 

Instead of 


Please click here: [https://www.something.com/path/Q013R29S6VEG7V]

Is there a way to strip out just the url or JUST pass the url and not both displayed txt and url? like {{issue.description.toString()}} or something (which doesn't work).

Thanks.

 

Or even how I would call the URL field (which I can populate automatically if needed) in the jira automation {{issue.URL}} ??

image.png
   

1 answer

1 accepted

1 vote
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2022

Hi @Mark Trochym ,

Good observation! The formatting inside Jira Description and Comment blocks can render oddly when passed along to Slack. You could try using the text function to have Automation strip out the Jira-side rendering before it sends the message through - as you noted, this is pretty much like toString(). Calling .text on the smart value should do the trick:

Please click here: {{issue.description.text}}

There's a list of functions you can call on smart values documented here , although .text isn't listed. I have used .text in other places successfully!

Cheers,
Daniel

Mark Trochym October 4, 2022
{{issue.description.text}}

Worked like a charm! Thanks 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events