SOLVED

How to format link column?

Copper Contributor
 
I'm trying to create a flow that posts an Adaptive Card in Teams based on a new submission to a SharePoint list. 

 

When a link is added to the related SharePoint list column (via Microsoft Forms), it appears like this: 

 
hemenzel_1-1683313594917.png

 

How can I get a flow to grab just the link information in order to include it in the adaptive card? Or, better yet, how do I format the Column to make this a clickable link?

5 Replies
best response confirmed by hemenzel (Copper Contributor)
Solution

@hemenzel What is the column type in SharePoint used to store this information? If it is a multiple lines of text column storing this complete JSON array, I don't think you will be able to make if clickable using JSON formatting.

 

However, you can use expression like below in Power automate flow to extract only link from the JSON: 

 

@{first(json(variables('strJSON')))?['link']}

 

Example

ganeshsanap_1-1683534056351.pngOutput

ganeshsanap_0-1683534018972.png


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

@ganeshsanap Thanks - this gives me something to work with! Yes, the column setting is multiple lines. Can you recommend how to pull the link info if the source data (Agenda) is like so?

 

hemenzel_0-1683561964533.png

 

@hemenzel You can use the same expression like below if you are having hyperlink property named link inside nested Agenda column value: 

 

@{first(json(variables('strJSON')))?['link']}

Use this inside compose action after initialize variable action.

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

@ganeshsanap, Ah, okay....I set it up like this, but am now getting an "invalid template" error....

 

first(json(variables('strJSON')))?[triggerOutputs()?['body/Agenda']]
 
hemenzel_0-1683647356207.png

 

I appreciate your help!!

 

@ganeshsanap, never mind, I got it to work thanks to your suggestions. Thank you 100000!! 

1 best response

Accepted Solutions
best response confirmed by hemenzel (Copper Contributor)
Solution

@hemenzel What is the column type in SharePoint used to store this information? If it is a multiple lines of text column storing this complete JSON array, I don't think you will be able to make if clickable using JSON formatting.

 

However, you can use expression like below in Power automate flow to extract only link from the JSON: 

 

@{first(json(variables('strJSON')))?['link']}

 

Example

ganeshsanap_1-1683534056351.pngOutput

ganeshsanap_0-1683534018972.png


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

View solution in original post