Skip to main content
Community site session details
Power Apps - Building Power Apps
Answered

Camera and Uploading Images using Flow

Like (0) ShareShare
ReportReport
Posted on 10 Feb 2020 01:46:15 by 19

Hi All,

 

I'm quite new to PowerApps and am using the Site Inspector template to learn and play. 

 

One of the things I would like to learn with it is to upload the images and descriptions to SharePoint and a network location with Flow/Power Automate.

I've created the Flow, however, I don't quite understand the logic for parsing the parameters to it, and whether it is possible to include this flow process as part of the 'Save' button which currently runs SubmitForm(FormNewInspection)

 

Would someone be able to provide some explanations around the CameraPhotos and whether this is possible?

 

Thanks

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    148,805 Most Valuable Professional on 10 Feb 2020 at 05:34:44
    Re: Camera and Uploading Images using Flow

    OK thanks @SamTimmins ,
    This is one of the less complex items.
    Firstly I will explain the process on the various controls. Note there any many different ways of doing this and this is one of the simpler ways that work.
    Firstly, the OnSelect of the Camera Control (I will call it CameraBox)

     

    ClearCollect(colPhoto, CameraBox.Photo)

     

    This stores the image in a collection called colPhoto. I will deal with single images here, but you can store and send multiple at a time instead of each one separately.
    To preview the photo, insert an Image Control with the properties

     

    First(colPhoto).Url

     

    Now to the Flow.

     

    • Choose New > Instant from Blank, give it a name (my example is FilePhoto) and choose PowerApps as the trigger.
    • Choose New Step > SharePoint > Create File
    • Add your site and folder and then Ask in PowerApps for the File name and File content

    It will then look like the below the PhotoFlow1 file attached.
    The next part is a bit tricky

    • Delete the file content bit for then moment, click on Expression at the right and type in dataUriToBinary(
    • The other bracket will appear - select Dynamic Content and put back in the item in the box at the bottom
    • The text should now say dataUriToBinary(triggerBody()['Createfile_FileContent']) - click OK. You can actually type this into the Expression if you want. It should now look like PhotoFlow2 attached.
    • Save the Flow - you are now finished with it.

    Now back at PowerApps, attach the Flow to a button on the OnSelect property choose from top menu -  Action > Power Automate the choose the Flow from the list. Your command line should now say FilePhoto.Run(   if that was the name you used.
    I will call your file name Test.jpg you will need to substitute whatever you use. so the code will end up

     

    FilePhotoRun("Test.jpg",First(colPhoto).Url)

     

    This will send a photo from the camera to a file called Test.jpg to your SharePoint Library.

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete