SOLVED

Add Image column ServerRelativeURL to another column

Copper Contributor

Hi, I am a beginner so thorough explanation would be appreciated.

 

I am using the Image Column where users can upload an image (not a hyperlink). It then automatically gets uploaded to a folder named after the list ID. When formatting the column/view using "txtContents":"[$ImageColumn.serverRelativeUrl]", I can see the URL needed.

 

Now whenever the list item has an image uploaded, I need to get its URL and automatically populate a Hyperlink Column with it.

 

Ideally, the process would be this:

 

PowerApps: User adds a new item to the list --> SharePoint: New item is created in the list --> PowerAutomate: If there is a photo in the Image Column, get the Server Relative URL --> Add the URL to the Hyperlink Column.

 

From my research I need to use "Send an HTTP Request to SharePoint" but I'm stuck on how to do this correctly. Any help would be brilliant please.

 

Thank you.

4 Replies
best response confirmed by viktorijab (Copper Contributor)
Solution

@viktorijab Yes, you have to use "Send an HTTP Request to SharePoint" action in Power automate flow to get the Image column details as standard SharePoint connector triggers do not provide it in triggerOutputs.

 

So, you have to use the flow like below: 

ganeshsanap_0-1681299026459.pngRelated reads:

  1. SharePoint Online: All you need to know about New Image column type 
  2. Download Image from SharePoint Image column using JSON formatting 
  3. Update image in SharePoint/Microsoft Lists Image columns using Power Automate 

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

Thank you, this works! However, one last problem - for very specific reasons the Update --> Hyperlink only works with the Outputs (Compose - Image URL) without "https://CompanyName.sharepoint.com".

But that gives the following error:
The 'inputs.parameters' of workflow operation 'Update_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Hyperlink' is required to be of type 'String/uri'. The runtime value '"/sites/SiteName/SiteAssets/Lists/ListID/Placeholder.png"' to be converted doesn't have the expected format 'String/uri'.

How would I convert that to make it suitable please?
Thank you

@viktorijab It is working fine for me. I have tested and posted screenshot of working flow.

 

What is the problem when using tenant URL with outputs of compose action? You can also concatenate both using concat function to create a single string output.

 

Also, you are receiving the error when you are not using tenant URL because SharePoint hyperlink column expects value with valid URL staring with either http or https. Hence, you have to prepend the tenant URL to server relative URL of an image.


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

Apologies, it is working great! I was including "https://www" when I should've used just "https://"
Thanks again for the response, the problem is now solved.
1 best response

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

@viktorijab Yes, you have to use "Send an HTTP Request to SharePoint" action in Power automate flow to get the Image column details as standard SharePoint connector triggers do not provide it in triggerOutputs.

 

So, you have to use the flow like below: 

ganeshsanap_0-1681299026459.pngRelated reads:

  1. SharePoint Online: All you need to know about New Image column type 
  2. Download Image from SharePoint Image column using JSON formatting 
  3. Update image in SharePoint/Microsoft Lists Image columns using Power Automate 

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