Edit issue custom field with smart value from webResponse.body
Asked by Grzegorz Ostrowski:

In my automation rule I use send web request component. It returns me for example this json in {{webResponse.body}}:

{"zadanieNumer":"ZGL/2022/02/11","zadanieGuid":"dcc40184-e41c-4d70-97a9-053f6039b4cc"}

In next step i use Edit issue component to set value to custom field.

When I set field with value: {{webResponse.body.zadanieGuid}} i get empty value.

The same with {{webResponse.body.zadanieNumer}}. It should be possible to get value this way. Can somebody write mi what I am doing wrong?

I added screen with my Edit Issue component.

![ScreenHunter 36 (01).png](/t5/image/serverpage/image-id/182626i7A5106AC3B968FE8/image-size/large?v=v2&px=999 "ScreenHunter 36 (01).png")


Answers:
author: Mark Davidson
body: Hi [@Grzegorz Ostrowski](/t5/user/viewprofilepage/user-id/31347) ,  

I went ahead and tested your smart value and it's valid so there's no issues there.   

Could you confirm that you have the setting in the image below set?  

Json Tester --\> <https://jsonpath.com/>  
![Web Request.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182672iC70405E36AA7AF22/image-size/large?v=v2&px=999 "Web Request.jpg")![Test.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182671i34A73BEF689297A2/image-size/large?v=v2&px=999 "Test.jpg")

comments: author: Grzegorz Ostrowski
body: [@Mark Davidson](/t5/user/viewprofilepage/user-id/4710026) Yes I have it checked

![ScreenHunter 37.png](https://community.atlassian.com/t5/image/serverpage/image-id/182723iC4AFE66967146B8E/image-size/large?v=v2&px=999 "ScreenHunter 37.png")

I have if/else compound after web request compound to handle response. I get correct response. And correct json in {{webResponse.body}}.


author: Mark Davidson
body: If possible could you please share a screenshot of your entire automation rule, hard to tell that one of the many factors that could be effecting this aren't present.


author: Grzegorz Ostrowski
body: [@Mark Davidson](/t5/user/viewprofilepage/user-id/4710026) This is schemat of my automation rule:

![ScreenHunter 38.png](https://community.atlassian.com/t5/image/serverpage/image-id/182735iB4A41FB19887F569/image-size/large?v=v2&px=999 "ScreenHunter 38.png")


author: Grzegorz Ostrowski
body: [@Mark Davidson](/t5/user/viewprofilepage/user-id/4710026) I have managed using this code in Edit Issue component to get values from JSON {"zadanieNumer":"ZGL/2022/02/11","zadanieGuid":"dcc40184-e41c-4d70-97a9-053f6039b4cc"}.

![ScreenHunter 39.png](https://community.atlassian.com/t5/image/serverpage/image-id/182746i5965A3A6B7286830/image-size/large?v=v2&px=999 "ScreenHunter 39.png")

But it should be as simple as {{webResponse.body.zadanieGuid}}. Why it dont work in my case. Is this some kind of bug?


author: Sam Harding
body: Hi [@Grzegorz Ostrowski](/t5/user/viewprofilepage/user-id/31347)

From your solution you've posted above, it seems like the webhook body is being read in as a string, and not the dictionary/map structure. Is it possible to check whether the webhook sender is encapsulating the data inside a string when it sends the webhook?


Tags: cloud