Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

For webhook to slack, double qoute problem in custom data as json type in action of 'Send Web Reque'

i'm using webhook to slack.

and throw data type of json to slack. 

for example about custom data:

{
     "type": "section",
     "text": {
     "type": "mrkdwn",
     "text": "{{comment.body}}"
 }

if it is assigned double quote(") in smart value({{comment.body}}, occur invalid_payload error. so I tried some way, like using quote(), or replace(), but it doesn't work at that form.

i comfirmed it worked smart value where is in non json type data like "Send slack message(it is one of action type"

 

anybody help me?

1 answer

0 votes
Daniel Eads Atlassian Team Jul 08, 2021

Hi @Kix JY _Jong Yi Kim_ _TSE_ , welcome to the Community!

Not knowing the particulars of your situation, I would like to mention a couple possibilities that might simplify your setup.

  1. The official Jira for Slack plugins - in Cloud, it's pre-installed in Jira. For Server/Data Center, you can install it for free from the Marketplace . The app has a filter that you can use to trigger a message to a Slack channel when someone leaves a comment on an issue in a project, or even if the issue matches particular JQL. This is an easy way to send comments to Slack with a GUI for configuration.
  2. Jira's Automation - if you need things a little more advanced, Jira's Automation engine has an action to "Send Slack Message". On the backend, this still uses a webhook. But Automation handles escaping the message for you! See this documentation for setup instructions and an example of sending Slack messages with Automation .

I hope this helps! In most cases, one of these two options should make sending messages to Slack easier without having to manually configure a webhook.

Cheers,
Daniel | Atlassian Support

Hi Daniel, Thank you for your answer.

but unfortunately, i have to use "Send Web Request" to remain now form what i am using now. 

I'd like to use smart value library in "Send Web Request" in this case "quote().

but it is no working. 

So is there any method to solve this problem?

스크린샷 2021-07-15 오후 7.23.53.png

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you