Microsoft

Use Power Automate to update Azure DevOps queries

Apr 24, 2023Erik Reitan
Use Power Automate to update Azure DevOps queries
SummaryAI, from the source post

This post details the implementation of a Power Automate flow to automatically update Azure DevOps queries that contain sprint numbers. The flow uses the Azure DevOps connector to list queries within specified folders, retrieve their Work Item Query Language (Wiql) values via HTTP requests, and then programmatically update the sprint number within the Wiql string using string replacement functions. The updated Wiql is then sent back to Azure DevOps to update the query. The process involves setting up recurrence triggers, defining variables for sprint paths and numbers, looping through sprint folders and queries, and conditionally updating the Wiql based on whether the query path contains the previous, current, or next sprint name. It also includes escaping mechanisms for the Wiql string and a final check to ensure the Wiql has changed before sending the update request.

More from the Automated Azure DevOps Query Updates trail