Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

How to set conditions to avoid duplicate Tasks creation for a User Story

Hi All,

I created a MS Flow to create 9 tasks (Dev, Testing and BA tasks) as a child for a new user story when it is assigned.

It works fine but it is getting duplicated every time when the story is assigned back from Unassigned to a resource.

I tried to get the count of related tasks for the user story before creating them but couldn't find any default conditions to get that.

Is there any other condition to set to avoid this duplicate task creations? Please assist me with this flow.




@yashag2255- After updating the details, the steps ran as you have mentioned and returned the query results like below.


I tried to iterate through using the Apply to Each condition to check for the Value to contain implementation, but it always returns false.





Please help me with building that condition to loop through and  how to properly iterate those values. 


As requested for my flow, after getting the query results, I need to check for those previously created tasks.  If they are available, i need to skip creating those tasks; else create the tasks and link it to the user story.

Hi @Mustaque_Ehiya 


Please refer to the screenshot below. 

Tes is just my variable. You can keep the value of the query results over there. Just see the expression in the if conditiontestas.png

Hope this Helps!

Hi @Mustaque_Ehiya 


Just checking in if you were able to run the flow succesfully and get the query results to parse to the next actions. 

@yashag2255  -  It worked as I required after modifying the condition.  


I set a counter to check the tasks containing the title "Dev: Implementation".  Based on that, I added another condition to check for the counter value and create the tasks.   Hope this is right.


Please let me know if that requires any further modification.  


Thanks for your support.

I am glad it worked. Just one note: While sending the HTTP Request, it is a good practice to first see what results the query is bringing in on Azure DevOps and it will be much better if you can export that query (by installing the custom plugins that show the wiql query) and that way you can create the action with much ease.



One general query.


I modified the flow from 'When a work item is assigned' to 'When a work item is updated' (which is still in preview state).  Now the flow is not getting executed and it is in running mode for a long time and times out.

once i got the below error.


bad gateway.PNG


Have any one used this 'When a work item is updated' condition?

when this will be available for full release?  

many times I got this error.



Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (104,081)