cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
HeadInTheCloud
Level: Powered On

How can I add a Hyperlink to a DevOps work item using a flow?

My flow needs to update a DevOps work item with a hyperlink. This can be done manually through the DevOps user interface by adding an existing item and selecting Hyperlink as the link type. However, in the Flow, the Update  Work Item template does not allow Hyperlink as a Link Type. I put Hyperlink into the field, but the update errored with 'Unknown relation type System.LinkTypes.Hyperlink'. I really need this. Please guide me to how I can add the Hyperlink.

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
HeadInTheCloud
Level: Powered On

Re: How can I add a Hyperlink to a DevOps work item using a flow?

I figured out how to do it - it took me all day - but I am tickled to find a solution using the "Send an HTTP Request to Azure DevOps" action.

 

See the following Flow action where the variable IDOfWorkItem is the work item to be updated and the variable DEVOPSAPIURI is URL:  https://dev.azure.com/<organization>/<project>/_apis/wit/workitems/@{variables('IDOfWorkItem')}?api-.... The AddLinkJSON below uses a RelatedItemURL that is in the form "https://....". Setting the Content-Type was one key to getting this to work.

 

Adding a hyperlink to a work item using Flow HTTP PATCH.JPG

Here's proof:

Successful flow to add a link.JPG

 

and the link now appears on the work item

Added link on work item.JPG

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: How can I add a Hyperlink to a DevOps work item using a flow?

 

Hi @HeadInTheCloud ,

 

It seems we can't add hyperlink to work item, please check this similar thread:

https://developercommunity.visualstudio.com/content/problem/308914/not-able-to-add-hyperlink-to-work...

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HeadInTheCloud
Level: Powered On

Re: How can I add a Hyperlink to a DevOps work item using a flow?

@v-bacao-msft Thanks for the reply to my post. I'm not sure that applies to my issue since I am able to add a Hyperlink to a Work Item via the Web UI by going to the Links Tab and selecting the Add Link - Existing Item drop down option. That opens the form shown below and I can enter the URL and select Hyperlink in the Link Type. 

Adding a hyperlink to a work item in Azure DevOps (Existing)

 

[edit - the UI image is in the next reply]

HeadInTheCloud
Level: Powered On

Re: How can I add a Hyperlink to a DevOps work item using a flow?

@v-bacao-msft Thanks for the reply to my post. I'm not sure that applies to my issue since I am able to add a Hyperlink to a Work Item via the Web UI by going to the Links Tab and selecting the Add Link - Existing Item drop down option. That opens the form shown in the first screen shot below and I can enter the URL and select Hyperlink in the Link Type. My problem is that I need to add a link to a Dynamics CRM record to a Work Item in a Flow. Options in the DevOps "Update A Work  Item" action allows me to add a link to another Work Item (see second screen shot), but not to a CRM item. IMO, that's an operation Flow should offer. "Create A Work Item" appears to have the same limitation.

 

Adding a hyperlink to a work item in Azure DevOps (Existing).JPG

 

Here's what Flow offers me for Link Type options - only links to other work items -

 

Link types available when updating a work item via Flow.JPG

HeadInTheCloud
Level: Powered On

Re: How can I add a Hyperlink to a DevOps work item using a flow?

I figured out how to do it - it took me all day - but I am tickled to find a solution using the "Send an HTTP Request to Azure DevOps" action.

 

See the following Flow action where the variable IDOfWorkItem is the work item to be updated and the variable DEVOPSAPIURI is URL:  https://dev.azure.com/<organization>/<project>/_apis/wit/workitems/@{variables('IDOfWorkItem')}?api-.... The AddLinkJSON below uses a RelatedItemURL that is in the form "https://....". Setting the Content-Type was one key to getting this to work.

 

Adding a hyperlink to a work item using Flow HTTP PATCH.JPG

Here's proof:

Successful flow to add a link.JPG

 

and the link now appears on the work item

Added link on work item.JPG

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,850)