Forums

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

Automation: How to access full body in "Send web request"

Hanna B June 16, 2023

I am trying to send a webhook request after an issue has been created using a custom body. I am able to send specific variables, such as "{{issue.self}}" and "{{issue.changelog}}", but not all of the issue data created in the issue response which is what I would expect from a "issue" call.

From what I can tell reading docs, {{webhookData}} would be the variable to get the full body in previous versions, but that does not seem to work. Is there an equivalent now? If there is more data than what is in the "issue data" standard body, such as the user and trigger data that was once available, that would be even better. 

2 answers

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.
June 16, 2023

Hi @Hanna B -- Welcome to the Atlassian Community!

Are you trying to send the entire issue as data for the call? 

If so, I am unclear how that is possible with just the issue in the rule, as the default attribute for an issue appears to be the key only.  Instead you could identify the fields you need and provide them in the custom data.

I suppose a work-around would be to use another web request to call the REST API to search for the new issue, and then send that response message in your new web request.  One challenge is only some fields are supported in the public REST API, and so to learn what you might get please try this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Hanna B June 16, 2023

Hi Bill,

 

There is an option to send the issue body for the call as a standard option, but I am looking for a way to do that as a custom body so I could do more things in the call directly.

 

That workaround is not something I had though of before, so I will look into it. Thank you for the advice.

 

Best wishes,

Hanna

Like Bill Sheboy likes this
0 votes
Hanna B June 16, 2023

image.pngIn other words, I am looking for a call like this that will give me all of the information available for this "Send web request" automation step.

Suggest an answer

Log in or Sign up to answer