Handling Images in Kaizala Part II

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.

Fig 1: cdn URL of image generated upon card submission

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.

Fig 2: Storing cdn URL of image in SharePoint through Power Automate

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.

Fig 3: Fetching an image from SharePoint through Power Automate

Here is the code to trigger the above Flow and set the image returned in the card.

Fig 4: Code to trigger flow and use the response

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.

Fig 5: Storing image as a PNG file in SharePoint document library

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 kaizaladev@microsoft.com or comment below.

3 thoughts on “Handling Images in Kaizala Part II

  1. Is there any way to create below flow.
    When Announcement is published on Kaizala, same will be published automatically on sharepoint home page also.
    I could create a flow which captures images posted as part of announcement in Kaizala group and store it on sharepoint Document library. But not able to publish it on sharepoint site home page. It remains as documents only.

    Like

    1. Please explore the Sharepoint connectors in Power Automate. Connector for triggering when an announcement is published on Kaizala group is available. You can parse the details and store them in Document Library also using relevant Sharepoint Connectors.

      Like

Leave a comment