How to get contents of an image column of SharePoint in Power Automate

Welcome to all of my readers. I am back with another blog on Power Automate. In today’s blog, I will walk you through on how to get the content of image column of a SharePoint list in Power Automate

So let’s get started. I have a SharePoint List with an Image column.

Get contents of image column of SharePoint list in Power Automate
The requirement is to get the content of the Thumbnail column when the list item is created.

I create a list item. And as expected my flow executes. I was expecting, I will get the data of the Thumbnail image. The action output returns few properties related to the image column.

Get contents of image column of SharePoint list in Power Automate

I was quite sure that either I will get a link or the content of the image column through any of these properties. However to my surprise, all the properties return null values. Below is the output of the action in json viewer.

Get contents of image column of SharePoint list in Power Automate

As you can see, the Thumbnail property is blank. A little bit of Google search and I came to know that image columns are not supported by Power Automate as of the time of writing this blog.

Fortunately there is another way to do this. So let’s check this out.

It’s a two step process. The first step is to get the URL of the image asset. To start with, I use the action ‘Send an HTTP request to SharePoint’

Get contents of image column of SharePoint list in Power Automate
Observe the URL here.
_api/Web/Lists/getByTitle('<list name>')/items?$filter=ID eq <Listitemid>&$select=<image_column_name>

You need to replace the above placeholders accordingly as per your environment. And below is the value of the Thumbnail column from the output of the action.

Get contents of image column of SharePoint list in Power Automate
And below is the value of the Thumbnail property.
"{"type":"thumbnail","fileName":"quicktip.jpg","nativeFile":{},"fieldName":"Thumbnail","serverUrl":"https://m365x39990321.sharepoint.com","fieldId":"a3fd8adb-75d9-4741-93cc-d5f1008d82c8","serverRelativeUrl":"/SiteAssets/Lists/d12dc310-7824-49aa-8613-bafbcfa9738a/quicktip3.jpg","id":"24bbc36c-a6b5-4776-873a-5c0c7d0be9c5"}"

Check the serverRelativeUrl property. This is what we need to get the file content.

The results property is an array. I use Apply to each action on the array and get the Thumbnail property value in a variable.

Get contents of image column of SharePoint list in Power Automate

I then use the ParseJson step of the Compose action to convert the Thumbnail content into JSON.

Get contents of image column of SharePoint list in Power Automate

The final step is to use the action – Get file content using path of the SharePoint connector.

Get contents of image column of SharePoint list in Power Automate

The input parameters are pretty simple. I don’t need to explain it further.

And finally what we set out to achieve in the beginning. We have content as output of the action.

Get contents of image column of SharePoint list in Power Automate

Not as straightforward as I thought. But it works nonetheless. How to get the content out of the action? Well I leave it you to complete the remaining part. Reach out to me if you have problems retrieving the same.

Hope this helped. You will also like the below posts.

Debajit Dutta
Business Solutions MVP


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading