In this post, we will discuss how we can use an image uploaded from Kaizala in our workflows. We will be using Power Automate to capture the image and upload it in a SharePoint document library. If you want to use webhooks to capture media details instead of Power Automate, please take a look at the post here.
When an image is uploaded from a custom card to Kaizala, Kaizala service stores it in Content Delivery Network and returns a link similar to “https://cdn.ins-000.kms.osi.office.net/…..”. You can paste the URL in your browser and download the image file.
So, when someone responds to a custom action, Power Automate gets the cdn URL as the answer to the image question in the custom card. If you want to store the cdn link in SharePoint, you can do so by creating an item in a SharePoint list with the URL. This will store the image details in text format as shown.
If you want to fetch details from SharePoint and show the image in the custom card, you can do so by creating a flow similar to below. The response of this Flow will be a cdn URL which needs to be rendered in the custom card. Here is a blog post that talks in detail about how to fetch details from SharePoint and show them in a custom card.
Here is the code to trigger the above Flow and set the image returned in the card.
If, on the other hand, the need is to upload an image file onto SharePoint (as opposed to a link), you can do so by creating an image file from the cdn URL. Once done, you can upload the image file into a document library. This can be achieved by making a HTTP Get call in Power Automate using the cdn URL. The response from this call is the image and we can give an appropriate name to it.
In this post, we saw how we can upload and fetch image details from SharePoint. We also took a look at how images can be stored in SharePoint document library. The card and the flows are available here. For any queries please reach out to email@example.com or comment below.