cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
G99
Post Prodigy
Post Prodigy

How to convert Base64 Text in a SharePoint List

Hi all, I have images (taken from the camera) from Power Apps and stored in a SharePoint Online list, as Base64 Text (in multiline text field).
The users would like to view/download these from SharePoint (they can view the image fine in Power Apps) and I am unsure how to achieve this.
It was suggested I would need a flow to convert this, but I am unsure how to do this.
Any help would be appreciated

10 REPLIES 10
PrasadAthalye
Community Champion
Community Champion

You can use Create file option and may be send it via email given in below thread...

 

https://powerusers.microsoft.com/t5/Building-Flows/Get-File-Content-as-Base64/td-p/73919

 

OR Save the file back to Document library and send a link to that doc library file..

 

Like and Mark this as answer if it resolves your issue

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

HI @PrasadAthalye 

 

I've seen that post and attempted it prior to posting my question, for whatever reason it is not working for me, please see screenshot of my flow and then another screenshot of the error.

 

CreateImageFail.JPG

CreateImageFail2.JPGCreateImageFail1.JPG

 

any ideas why its not working for me please?

 

PrasadAthalye
Community Champion
Community Champion

@G99 Can you directly use Create file to create JPG? In the filename give the name as .JPG and remove convert file action?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye 

I've tried that and the step does not fail, but when I go to open the file created in OneDrive it states:

 

G99_0-1600848776070.png

If i download it I get:

G99_1-1600848800646.png

Suggesting to me the creating of the file isn't working correctly?



PrasadAthalye
Community Champion
Community Champion

@G99 - Can you check Base64 string if it mentions the file type? I think it might be .png OR .JPEG... Try one of these...

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye 

 

I've checked the base64 string in PowerApps and it states:
data:image/png:base64,etcetc

 

What is you are suggesting I do?

PrasadAthalye
Community Champion
Community Champion

Please use .png as file extension and run flow and see if you can open generated file.

 

Please like and Mark this as answer if it resolves your issue.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye 

 

 

This doesnt work either, i wouldnt have thought it would make a difference, but changing to .png results in the same error when i try opening the file... any other suggestions in getting this working?

Jay-Encodian
Community Champion
Community Champion

Hey @G99 @PrasadAthalye 

Check out this post- https://blog.encodian.com/2019/09/reduce-the-size-of-images-generated-by-powerapps-with-flow/

You don't need use the Encodian actions... but steps 4 to 8 explain what you need to do

HTH

Jay

Hi I have managed to use Shane Youngs video to copy over the image to a SP doc lib:

https://www.youtube.com/watch?v=ovLIwnj6QjU

 

I just need to add another action, where the original SP list gets updated with the image location, something I am struggling with:

 

I am using update file properties action and in the expression:

 

concat('https://URL/Lists/ListName', outputs('Update_file_properties')?['body/{FullPath}'])
 
The error I have is:
Could not find list item.
clientRequestId: ID
serviceRequestId: ID

 

I presume this is because it does not know which item to update? Unsure how to tell it to update the current item?

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,408)