Forums

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

How do I extract just part of a 'webResponse'

SGC Associates Ltd
Contributor
December 30, 2024

 

How do I extract just part of a 'webResponse'

I have the following from a 'Send Web Request'

WebhookResponseBean{status=200, statusCategory=SUCCESS, headers={Connection=[keep-alive], Content-Length=[350], Content-Type=[application/json], Date=[Mon, 30 Dec 2024 23:01:01 GMT], Server=[Werkzeug/3.1.3 Python/3.13.0], Via=[1.1 ip-10-125-126-85 (squid)], X-Cache=[MISS from ip-10-125-126-85]}, body={message=To archive......

I just want to extract anything after the message=

How do I do this ( So I can add it as a comment on an issue )

Thanks in advance

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

6 votes
Answer accepted
Darryl Lee
Community Champion
December 30, 2024

Hi @SGC Associates Ltd and welcome to the Community!

You'll want to use:

{{webResponse.body.message}}

 

SGC Associates Ltd
Contributor
December 30, 2024

Darryl

Thanks for that

But doesnt seem to work, I have tried variations but to no avail

Is there a way to use something like javascript etc ?

Many Thanks

Darryl Lee
Community Champion
December 30, 2024

I was trying to find documentation for this, but it's embarrassingly scant:

Probably the best documentation is from Automation itself:


How do I access web request response values in subsequent rule actions?

To access the response data you will need to select the 'Delay execution' checkbox above.

On successful web request, you will be able access response data using the following smart values:

  • {{webResponse.status}} returns the response code e.g. 200
  • {{webResponse.statusCategory}} returns the category of the response status - INFO, SUCCESS, REDIRECT, CLIENT_ERROR, SERVER_ERROR, OTHER
  • {{webResponse.headers}} returns the response headers that you can access using dot notation e.g. {{webResponse.headers.Content-Type}}
  • {{webResponse.body}} returns the response body, if the body is a JSON object then you can access values using dot notation e.g. {{webResponse.body.name}}
  • {{webResponses}} returns a list of the 10 most recent responses this rule received. E.g. {{webResponses.last.body}}
Like Steffen Opel _Utoolity_ likes this
Darryl Lee
Community Champion
December 30, 2024

Hi @SGC Associates Ltd, I'm sorry to hear you're having issues. If you can, it'd be helpful if you can take a screenshot of your rule or at least the parts with the web request and the part for the Comment.

This is an example of what should work in your case:

Screenshot 2024-12-30 at 4.07.03 PM.png

Hmmmm, actually, considering what you posted includes Webhook... maybe you're on Data Center (on-prem)? Sorry my bad for ASSuming you were on Cloud.

If you are on Data Center, you would want to use:

{{webhookResponse.body.message}}

SGC Associates Ltd
Contributor
December 30, 2024

Sorry, It does work,

Just takes a few seconds to add !

 

Many Thanks

Truly appreciated

Like # people like this
s_gridnevskii
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 Champions.
April 13, 2026

Hi @Darryl Lee 

Is it possible to convert webResponse.body into a dictionary so that I can use the following smart value code:

{{#webResponse.body.asList}}
"{{name}}": {{value}}
{{//#}}

I need it so that I can output whole body as json into comment without dot notation since I am not sure what can be value names. 

Something like: 


{code:json} {{#webResponse.body.asList}}
"{{name}}": {{value}}
{{//#}}
{code}

Evie Z_
Community Manager
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
April 13, 2026

@s_gridnevskii 

This topic is now closed as the discussion has become outdated. If you have more questions or want to continue the conversation, feel free to start a new topic. For more details on why we close older threads, check out our Rules of engagement - Atlassian Community .

Thank you for your understanding!

TAGS
AUG Leaders

Atlassian Community Events