Forums

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

Accessing data from received webhook.

Lech
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 15, 2024

I'm trying to send data via webhook from Jira Service Desk (on-premise v7.3.1) to automation on Jira Software (cloud). My problem is to access sent data because they don't look like JSON. Here is a beginning of this string:

{comment=, issue={id=71591, self=https://jira.{mydomain}.com/rest/api/2/issue/71591, key=SDKEY-1, fields={issuetype={self=https://jira.{mydomain}.com/rest/api/2/issuetype/11502, id=11502, description=System environement issue, iconUrl=https://jira.{mydomain}.com/secure/viewavatar?size=xsmall&avatarId=10304&avatarType=issuetype, name=System issue, subtask=false, avatarId=10304}, project={self=https://jira.{mydomain}.com/rest/api/2/project/12404, id=12404, key=SD, name={mydomain} ServiceDesk,(...) and so on

I captured it from {{webhookData}} variable. However I have no idea how to deal with direct variables like issue key, or issue summary. Of course I see desired information in captured string.

At the end of a day I want to achieve a clone issue functionality between this two instances (on-premise and cloud). Maybe there is a simpler way to do it?

1 answer

0 votes
Bill Sheboy
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.
January 15, 2024

Hi @Lech 

Are you doing this with an automation for Jira rule?

If so, have you tried:

  • Using dot-notation to access the fields?  For example: {{webhookData.issue.key}} to get the issue key?
  • Using text functions, such as match() with regular expressions to extract the values?

Kind regards,
Bill

Lech
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2024

I've tried dot-notation but you inspired me to do it different way :) thx

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer