Forums

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

What is the proper syntax to read a web request response string?

Tim Bonney
Contributor
August 12, 2025

Can anyone advise me on what the proper syntax is to be able to read a web request response string?

I am trying to build an automation rule using a send web request action (to establish the account IDs that need to be appended to a work item as participants), followed by simply writing the response string to either the audit trail or a variable/smart tag so I can evaluate it before actually applying the value to the participants field. However, none of the following syntaxes work:

{{webResponse}}
{{webhookResponse}}

{{webRequest.response.body}}
{{webRequest.response}}

{{response.body}}

Can anyone advise what the proper syntax is to obtain the response string from this web request? I did find some tangentially related posts elsewhere in the forum, but none have actually helped me resolve this issue yet.

Thanks in advance.

2 answers

1 accepted

0 votes
Answer accepted
Marc - Devoteam
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.
August 12, 2025

Hi @Tim Bonney 

The proper smart value is: {{webResponse.body}}

Tim Bonney
Contributor
August 12, 2025

Thank you Marc.

I think I have found that {{webhookResponse.body}} is functioning. Is this possibly an either/or scenario, where either one will actually work, or is is absolutely {{webResponse.body}}?

Like Marc - Devoteam likes this
Marc - Devoteam
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.
August 12, 2025

Hi @Tim Bonney 

This depends of you use a webhook trigger or web request action in automation

{{webhookResponse.body}} is for webhook trigger and {{webResponse.body}} for web request action

Tim Bonney
Contributor
August 12, 2025

Excellent! Thank you for the clarification Marc! (I am using web request, so your initial answer still applies.) Thanks again for sharing.

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.
August 12, 2025

Hi @Tim Bonney 

For a question like this, context is important for the community to help.  Please post the following:

  • which REST API endpoint are you calling
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution

Until we see those...

I am glad to learn you are writing the entire {{webResponse.body}} to the audit log as that will help know the structure for the specific endpoint called.

{{webResponse.body}} is likely a list of values for what you describe, and could be iterated over for your participant updates.

 

Kind Regards,
Bill

Tim Bonney
Contributor
August 12, 2025

Hi Bill. Thanks for your response and feedback. I apologize for being too vague.

Since posting this, I believe I have determined that the proper syntax is actually webhookResponse.body...and in my particular use-case should be webhookResponse.body.participants. However, it appears to be failing due to security/login issues, not improper syntax as I initially suspected.

What I am doing is trying to append the participants on work items, based on a set schedule, with a 12 hour work day divided amongst 4 different analysts, assigning each as a participant on newly created work items depending on the time of day the work item is created.

Since I do not have the option to store a table or worksheet in JSM, I had to think outside the box and create a Google sheet to house the table and use a Google Apps Script to generate the proper account id for whomever the participant is that needs to be added.

What I have discovered though, is that the web request GET call is unable to get past the login page of the Google app/script because it is housed within our company network and therefore inaccessible to "all/anonymous" users such as JSM when executing the call from the automation rule to obtain the appropriate Account ID to use.

So now I need to figure out how to get over that hurdle instead of the proper syntax to read the call response, which is the one I initially thought I needed to get over.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events