web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps: Upload an i...
Power Apps
Answered

PowerApps: Upload an image to SharePoint using Flow

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

 

 I followed this Youtube video:

PowerApps Flow Intro Upload an image to SharePoint using Flow

 

It works great for picture taken with camera but when I tried to use "Add Picture" control from Media, Flow gives an error:
 
InvalidTemplate. Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '1900': 'The template language function 'dataUriToBinary' expects its parameter to be formatted as a valid data URI. The provided value 'appres://blobmanager/9d22d3a1fa3e4ccbb534c4913f752b79/2' was not formatted correctly. Please see https://aka.ms/logicexpressions#dataUriToBinary for usage details.'.
 
Any suggestion.
Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    I have made a test and the issue is confirmed on my side. 

     

    The image the Camera control captured is actually a image Data Url, the standard format the image Data Url the Camera control captured as below:

    data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA
    CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwA
    AAABJRU5ErkJggg==

    So you need to convert the Data Url into a binary data within your flow using the dataUriToBinary() function, but the image the Add picture control captured is not a image Data Url, the image data format the Add picture control captured as below:

    appres://blobmanager/0665075483e44d7ea1af450f3a61b472/1

    So the dataUriToBinary() function executes failed.

     

    If you want to upload the image captured via the Add picture control into SharePoint library folder, please check and see the following blog:

    http://repointtechnologies.com/saving-images-from-powerapps-to-sharepoint/

     

    In addition, please check and see if the following video would help in your scenario:

    https://www.youtube.com/watch?v=mp-8B1fLrqs

     

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @yugpatel,

     

    can take this workaround

     

     

    Set Flow to accept the value from PowerApp for varbinary type of SQL database.

    Please specify that value as SharePoint content

    キャプチャ.PNGキャプチャ1.PNG

     

    Best regards,

  • jgerardo Profile Picture
    2 on at

    @Anonymous, Thank you for your response, the solution looks interesting. However, can you translate the language on your images to english for better understanding?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @jgerardo 
    Currently, the function JSON () can be used to send images to Microsoft Flow (Automate) as datauri.

    Example)
    UpdateContext (
    {
    Photouri :
    JSON (Camera1.Photo, JSONFormat.IncludeBinaryData)
    }
    );

    You can then save it in the same way as a camera image

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard