Forums

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

Automation Webhook answer to custom field

Florian N. September 21, 2024

Hello,

I have created an automation with a webhook in JIRA, this webhook sends a GET request. The page then only responds with a string. I would like to write this string in a custom_field.

How do I do this?

I have tried this with custom data, unfortunately without success.

"issue.customfield_20404": {{webResponse.body}}

 

 

Best regards Florian

2 answers

1 accepted

5 votes
Answer accepted
Evgenii
Community Champion
September 22, 2024

Hi, @Florian N. 

Welcome to Atlassian Community!

You are right, you can use {{webResponse.body}} to set value for customfield.
You can check, that you receive responce from webhook, by validating it.

Like in my example. In payload you'll see responce from server. If it's just clean string, then use standard automation action "Edit Issue", select required field there, and fill smart value {{webResponse.body}}
If the body is a JSON object - then you can access values using dot notation. For my example it will be {{webResponse.body.success}}


Screenshot_3.png

Florian N. September 22, 2024

Hi @Evgenii ,

I have tried editing the issue. There I specified the text field as a field and {{webResponse.body}} as the value:

20240922_1756155

 

These are the webhook settings:

Webhook Validate:

Evgenii
Community Champion
September 22, 2024

I think, I found the problem.

Enable this checkbox

Screenshot_4.png

 

With it automation must work. I checked on my test site:
Screenshot_5.png

Like Florian N. likes this
Florian N. September 22, 2024

This worked, I activated the checkbox and entered “{{webhookResponse.body}}” for the field when editing the issue. This gives me the response in the field.


Thanks :)

Like 2 people like this
0 votes
Vikrant Yadav
Community Champion
September 21, 2024

Hi @Florian N.  welcome to Atlassian Community!

Are you sending Jira data to another automation rule having incoming webhook as trigger  or data is coming from any other application ? 

If you share the automation screenshot, that would be helpful for us, to givr your correct suggestion.

 

Thanks

Suggest an answer

Log in or Sign up to answer