DEV Community

Cover image for Ask, Filter, Deliver: Interactive Work Item Exploration for Product Teams
Bala Madhusoodhanan
Bala Madhusoodhanan

Posted on

Ask, Filter, Deliver: Interactive Work Item Exploration for Product Teams

Intro:
Product teams often face the challenge of sifting through a mountain of work items in Azure DevOps (ADO), searching for the signal amid the noise. Whether you’re validating a new requirement, checking the status of a change request, or planning for the next release, actionable insights—delivered quickly—are key.
This article explores how to leverage Power Automate’s connectors in an agentic workflow, enabling interactive exploration of work items. We’ll start with the quickest way to get started, then dive deeper into more advanced filtering and dynamic queries.

Quick & Easy: Using a Pre-Defined Query
For teams looking for a fast solution, Power Automate offers a simple method: use a pre-defined ADO query and connect it directly to your workflow. This approach is perfect when you already know the criteria you want to retrieve—such as all work items assigned to your team, or those marked as “New” or “Change Request.”

1) Setup the ADO query and get the system generated query ID

2) Use the ADO get query action and

3) Use this as a Tool to get the data into agentic workflow and let the orchestration engine do its magic to work on the data

If your pre-defined query returns too many work items, you may encounter errors or timeouts in your agentic workflow due to Power Automate’s data handling limits.

Dynamic Querying for Flexible, Context-Aware Exploration:
When you need more flexibility than a static, pre-defined query allows, it’s time to move to dynamic querying. This method lets your agentic workflow adapt on the fly—filtering data right at the source based on user input or real-time context.
Instead of relying on a single saved query, you dynamically build your ADO query, often using variables from Copilot prompts or Power Automate inputs. This makes your flows far more interactive and resilient—especially for product teams who need answers to specific, changing questions.

1) Use the “Send an HTTP request to Azure DevOps” Action

2)Build Your WIQL Query Dynamically
In the request body, construct your WIQL query.
Use dynamic content (variables, user responses, or Copilot inputs) to substitute values—like work item type, title, or state.


{
  "query": 
"SELECT [System.Id], [System.Title], [System.State]
            FROM WorkItemLinks
            WHERE [Source].[System.WorkItemType] = 'Capability'
            AND [Source].[System.Title] CONTAINS '@{triggerBody()?['text']}'
            AND [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'
            AND [Target].[System.WorkItemType] = 'Business Requirement'
            AND [Target].[System.State] <> 'Removed'
            MODE (MayContain)"
}
Enter fullscreen mode Exit fullscreen mode

The server only returns data that matches your specific, real-time criteria

When using this method, always validate user input and test query performance to ensure your workflow remains fast and reliable, even as requirements change.

Pre-Defined Query ** Dynamic Query (HTTP Request)**
Pros Pros
Fast to implement and easy to maintain Highly flexible—query adapts to user or agent input in real time
Reliable for routine, repeatable queries Efficient—returns only what’s needed, minimizing risk of timeouts/data overload
No need for advanced query skills Supports complex, cross-linked queries for richer insights
Cons Cons
Static: limited flexibility; not responsive to changing needs Requires understanding of WIQL and Azure DevOps REST API
If the query returns too much data, you may encounter errors or timeouts in your agentic workflow due to Power Automate’s data handling limits More setup and testing needed
Updates require manual changes in Azure DevOps Errors can occur if dynamic input is invalid or query structure is incorrect

Bottom Line:
Pre-defined queries are great for stable, repeatable needs and quick wins.
Dynamic queries empower truly interactive, agentic workflows—perfect for evolving product management and backlog exploration.

PS - The oDATA options is something to be explored

Top comments (0)