Forums

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

How to u smart values in webhook URL in jira automation

Rasa
Contributor
February 18, 2024

hi every one

i want to use webhook to send sms massage when an incident accrued.

sms should have some values such as issue summary, created date and other custom field data.

now i can send sms only with a default sentences, for example: "A new incident is Created in jira".

i use this code to send web request:

{
"registerApplicationName": "Jira",
"priority": 1,
"type": "SERVICE_ANNOUNCEMENT",

"destinationClients": ["0123456", "0123456"],

"messages": [

{ "title": "A new incident is Created in jira",
"message": "xxxxxx"

}
]
}

1111.JPG

i want it has other information such as summary and ...

how i can use this smart values in my code?

 

2 answers

2 accepted

3 votes
Answer accepted
BHUSHAN PATIL
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2024

Hi @Rasa ,

Hi @Rasa ,

you can use 

  • {{issue.summary}}: This Smart Value will be replaced with the summary of the Jira issue.
  • {{issue.created}}: This Smart Value will be replaced with the creation date of the Jira issue.
  • {{issue.fields.customfield_XXXXX}}: This Smart Value will be replaced with the value of the specified custom field for the Jira issue. Replace XXXXX with the ID of the custom field you want to include in the SMS message. 

you can add following line into webhook payload to include the issue summary, created date, and other custom field data:

"message": "Issue Summary: {{issue.summary}}\nCreated Date: {{issue.created}}\nCustom Field Data: {{issue.fields.customfield_XXXXX}}"

Regards,
Bhushan

Rasa
Contributor
February 18, 2024

Thank you so much BHUSHAN PATIL

very useful.

Like BHUSHAN PATIL likes this
0 votes
Answer accepted
Rasa
Contributor
February 18, 2024

i solve it 

thank you.

Suggest an answer

Log in or Sign up to answer