Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Search for WorkItem in Azure DevOps based on title/tags in flow

(0) ShareShare
ReportReport
Posted on by

Hi,

I am able to search for workitem in Azure DevOps given its ID, but I am looking for ways in which I can search for work item in Azure Devops given its title or Tags using Flow

 

Thanks

  • TomSt Profile Picture
    2 on at
    Re: Search for WorkItem in Azure DevOps based on title/tags in flow

    Hi @ad99 

    I'd like to find a work item based on a specific tag.

     

    For example:

     

    - retrieve all work items

    - from ADO project A

    - that are closed

    - with the tag of "xxx"

     

    How would I go about that? I've suggested my initial steps below with some queries.

    - Create a new 'automated from blank' FLOW

    - select azure devops trigger 'when a work item is closed'

    - Action: 'send HTTP request to ADO'

     

    My queries:

     

    - can you send me a screenshot of your HTTP request action? I;m unsure as to what values to populate.
    - can you suggest the correct steps I should follow or send me a screenshot of your FLOW and I'll modify from there?

    Thanks

  • ad99 Profile Picture
    on at
    Re: Search for WorkItem in Azure DevOps based on title/tags in flow

    Hi @yashag2255 ,

     

    Found my mistake. As 'Override Cleanup' has spaces in between we need to specify it in single quotes. 

     

    Thanks for your help

  • ad99 Profile Picture
    on at
    Re: Search for WorkItem in Azure DevOps based on title/tags in flow

    Hi @yashag2255,

     

    When i tried to filter it based on title as shown below: (Where 'Override CleanUp12' is declared as variable)
    {
    "name" : "TestNew",
    "queryType" : "tree",
    "wiql" : "SELECT [System.Id],[System.Title],[System.State],[System.WorkItemType],[System.AssignedTo] FROM workitemLinks WHERE([Source].[System.Title]=Override CleanUp12) AND ([System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward') AND ( [Target].[System.WorkItemType] <> '') MODE (Recursive)"
    }

    I am getting the following exception:
    {
    "$id": "1",
    "innerException": null,
    "message": " Expecting left bracket. The error is caused by «Override».",
    "typeName": "Microsoft.TeamFoundation.WorkItemTracking.Client.Wiql.SyntaxException, Microsoft.TeamFoundation.WorkItemTracking.Client.QueryLanguage",
    "typeKey": "SyntaxException",
    "errorCode": 0,
    "eventId": 0
    }

    Any clues about what I am doing wrong?

  • v-alzhan-msft Profile Picture
    on at
    Re: Search for WorkItem in Azure DevOps based on title/tags in flow

    Hi @ad99 ,

     

    As @yashag2255  said, search for work item in Azure Devops with its title or Tags derectly is not supported in microsoft flow currently.

     

    If you would like the function to search for work item in Azure Devops with its title or Tags derectly to be supported in microsoft flow, you could submit an idea to Flow Ideas Forum:

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Search for WorkItem in Azure DevOps based on title/tags in flow

    Hi @ad99 

     

    Currently flow does not support a search in work items based on title/ tags for Azure DevOps. 

     

    You could probably construct a custom query for this and keep updating it dynamically to get the appropriate results. Here is my blog article where I have shown a simple example to create parametrised queries with dynamic elements from Flow: 

    https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Create-Update-Parameterized-Queries-in-Azure-DevOps-with/ba-p/306106

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow