Forums

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

How to only run Create version once if webhook request contains multiple issues

Luka Nikolic
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2024

Screenshot 2024-08-14 121638.png

I want to create automation where I can trigger new release from webhook. Example of webhook:

curl -X POST -H 'Content-type: application/json' --data '{"issues":["TV3-1", "TV3-2", "TV3-3"], "version": "Release 1", "projectName": "TV3"}' https://automation.atlassian.com/pro/hooks/9952e279d84638f10a55c850ba46ccebf35bb6fc

If I set more than 1 issue in data I get the following warning

Screenshot 2024-08-14 122113.png

How can I make sure the release is only created once but than all tickets I specify are added to this release?

1 answer

0 votes
Tessa Tuteleers
Community Champion
August 14, 2024

hey @Luka Nikolic , 

Welcome to the community! 

If I interpret your rule correctly, in the trigger, you checked the "Execute this automation rule with: Issues provided in the webhook HTTP POST body"? 

In that case, the rule will loop over all the issues for all following conditions and actions, so it will try to create the version 3 times. 

Luckily, you can change that! 

It seems you are already familiar with json smart values, so I wont go into that detail. 
You simply check the last radiobutton ("No issues from the webhook"), then the rule will not start looping automatically. 

You can create the new version the same way you already did, and then use a smart value branch, looping over the issues in your webhookData yourself, and then add the version to each. 

If you can't get it to work, let us know what you tried and we will help debug! 

Cheers, 

Tessa

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events