Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 95Ih29mbcNk6vlPmDcjIXb
Power Automate - Building Flows
Answered

Creating Azure DevOps Work Items from SharePoint List Items

Like (0) ShareShare
ReportReport
Posted on 27 Feb 2024 22:51:19 by 35

Hi guys,

 

I would like to create a flow that automatically generates a work item on Azure DevOps using elements from a SharePoint list. In SharePoint, I've set up a list with columns such as ID, issue title, description, status, priority, created date, and logged by. While the flow successfully handles fields like title, description, and date, it encounters issues with columns like status, priority, and logged, where users can select options like high, low, or normal.

The problem arises because the runtime expects these values to be converted into integers or int32. How can I resolve this and ensure the flow works smoothly?

 

If anyone could provide hints or screenshots illustrating the solution, it would be greatly appreciated!  😄

  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on 29 Feb 2024 at 09:31:56
    Re: Creating Azure DevOps Work Items from SharePoint List Items

    Hi @BlackMamba,

     

    For that part you would have to collect the attachment content and use a couple of HTTP requests to upload it and relate it to a work item in DevOps. 

     

    @abm, has a nice video about this approach, https://www.youtube.com/watch?v=Ivdj6Gf_K-M That video uses email attachments as a source, but you could use the same HTTP request approach for SharePoint attachments.

  • BlackMamba Profile Picture
    35 on 28 Feb 2024 at 13:14:58
    Re: Creating Azure DevOps Work Items from SharePoint List Items

    @Expiscornovus 

     

    Thank you so much! That totally solved my problem. But I have one more question. I created two columns, first one (associated files)- where the user can add an attachment and another one (images) to upload image to the sharepoint list element. How do I connect this to azure so that these files automatically appear there?

  • Verified answer
    Expiscornovus Profile Picture
    31,648 Most Valuable Professional on 28 Feb 2024 at 10:49:08
    Re: Creating Azure DevOps Work Items from SharePoint List Items

    Hi @BlackMamba,

     

    In that case you might be able to use the priority/id property of your choice field. That id field does starts counting with 0 instead of 1. So, you would have to add 1 to it to be able to use it in the priority field of a Azure DevOps work item.

     

    Try something like below.

     

    1. This sample assumes you have the below order in your choice field.

     

    priority_field.png

     

    2. When you trigger the flow you can see in the outputs that each choice corresponds with a number as well, the id field.

     

    priority_id.png

     

    3. You can reuse that id field in your Priority field of the work item creation. Only gotcha is that you need to add 1 because the DevOps priority list does not start at 0 but at 1, unlike SharePoint choice values.

    add(triggerOutputs()?['body/Priority/Id'],1)

     

    add_to_id.png

  • BlackMamba Profile Picture
    35 on 28 Feb 2024 at 10:08:54
    Re: Creating Azure DevOps Work Items from SharePoint List Items

    Hi @Expiscornovus !

     

    I have used a column with a choice type, so the user can choose from 4 options: critical, high, normal, low. 


    I would like it to work in such a way that after selecting, for example, the critical option in priority in sharepoint, the corresponding number in azure would appear - that is, 1.

     

  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on 28 Feb 2024 at 10:01:02
    Re: Creating Azure DevOps Work Items from SharePoint List Items

    Hi @BlackMamba,

     

    What type of columns did you use for priority and status in your list? Single line of text?

     

    typecolumn.png

     

    In that case you could use an int function to convert the value to a number.

    int(triggerOutputs()?['body/Priority'])

     

    Below is an example of that approach.

     

    priority_devops.png

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,013 Most Valuable Professional

Leaderboard
Loading started