Converting base64 string output from JSON to image format

Hello,
I am building an automation using an API to call a 3rd party website and collect all cases on the website for a certain time frame, including the logo for each case. The logo is obtained through a separate endpoint which returns a base64 string in JSON format like the text below, it is then stored in a row on a data table.:
“{”“images”“:[{”“content”“:”“/stringofcharactersgoeshere=”“,”“type”“:”“image/jpg”“}]}”

For my process I need to convert this string to an image and then upload it to a SharePoint site. To do this I have created a process as follows:


In this instance the logoBase64 variable is of type string, logoConverted is of type byte array (Byte) and logoImageFile is type UiPath.Core.Image. The first assign gets the string from the appropriate column & row on the results data table, then i assign convert.fromBase64(logoBase64) to the logoConverted variable, then assign New UiPath.Core.Image(logoConverted) to the logoImageFile variable.
Admittedly my understanding of the convertFromBase64 method is not great and this is my first time working with base64, I’ve tried looking at other ways of invoking code but using assigns seems to be how others have done this on this forum, I am looking to see what I need to do to get the image output which I can then upload to SP using a onedrive/sharepoint activity scope. Any help would be appreciated with this.

Hi @Katie_Cunningham

Welcome to Community!

Reference link below!

Regards

Can anyone advise what the output for using the process in the above video would be? I have got this part working but I need to save the file locally so I can upload to sharepoint, but I cannot see where the file is created

once the Base64 were used for creating the image have a look on following activity for saving the image locally:
grafik

or use API calls

this is what I’m doing, however I need to tell it what file to save from the invoke method activity mentioned in the video. If i try to specify a result it presents an error that its incompatible to specify an output with the writeallbytes method so i’m just not sure what to pass to the save image activity now

can you share the XAMl so we can se what you have implemented in detail so far?