cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
luisdpp
Level: Powered On

Send a picture from powerApss to SharePoint

Hello, I'm working with a template to upload a picture into SharePoint through PowerApps, using the component "add image" and the action "UoloadfiletoSharePointfromPowerApps.run(Createfile_fileName; Createfile_fileContent)" but I don't know how can get the name of the file dymaniclly from the component, and I have to add the extension? for example .jpg? and what is the fileContent? What should I put in this parameter?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send a picture from powerApss to SharePoint

Hi Luisdpp,

 

It seems that you are trying to save images from PowerApps to SharePoint library. I try with a flow to create file in SharePoint Picture library when a button is clicked. This is my flow configuration:

Button.PNG

 

In the App, I add a button, a Text input, and an Image control, and add the flow to the button with this formula: UploadafiletoSharePointfromPowerApps.Run(TextInput1.Text,Image1.Image).

 

When the flow run, only the file name and it seems like the URL of the image as text is saved in the library. Though I configure the file extension to .jpg in the flow.

 

So I guess this feature has not been supported yet, and I have seen an idea at PowerApps Ideas Forum, you could vote this idea at here, PG would take hot ideas into consideration:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Upload-a-picture-captured-through-PowerApp-to-a-...


Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Super User
Super User

Re: Send a picture from powerApss to SharePoint

Hi,

 

 

Use the SharePoint Create file flow. Set the folder path, filename and file content. You don't need to set the extension. Thought the filename you can directly get from PowerApps?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



luisdpp
Level: Powered On

Re: Send a picture from powerApss to SharePoint

Yes, I was using that flow but my problem in this moment is that I don't know how can get a fileName (dynamicly) from the component, because in this moment the fileName is static.

Community Support Team
Community Support Team

Re: Send a picture from powerApss to SharePoint

Hi Luisdpp,

 

It seems that you are trying to save images from PowerApps to SharePoint library. I try with a flow to create file in SharePoint Picture library when a button is clicked. This is my flow configuration:

Button.PNG

 

In the App, I add a button, a Text input, and an Image control, and add the flow to the button with this formula: UploadafiletoSharePointfromPowerApps.Run(TextInput1.Text,Image1.Image).

 

When the flow run, only the file name and it seems like the URL of the image as text is saved in the library. Though I configure the file extension to .jpg in the flow.

 

So I guess this feature has not been supported yet, and I have seen an idea at PowerApps Ideas Forum, you could vote this idea at here, PG would take hot ideas into consideration:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Upload-a-picture-captured-through-PowerApp-to-a-...


Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

luisdpp
Level: Powered On

Re: Send a picture from powerApss to SharePoint

Thanks you so much. You help me so much.

Waterbizzle
Level: Powered On

Re: Send a picture from powerApss to SharePoint

There's a pretty awesome tutorial on Youtube that walks you through how to do this with a FLOW (using a custom API).  don't need any special tools and Paul does a great job of walking you through it.  

 

 

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

 

Video is about 40 minutes long, but you're be MUCH smarter on some of the hidden jems of Powerapps and flows.

Anonymous
Not applicable

Re: Send a picture from powerApss to SharePoint

IMPORTANT:
1. The YouTube video described IS awesome - many thanks to the creator; but 

2. The solution described DOESN'T employ a "custom" API - something developed by the creator ! 

 

Referring to his solution as possessing a "custom API" deals an injustice to the solution's creator 😐

 

What the solution does is this: 
- CREATE a PowerApps app which CALLS a custom Microsoft Flow which in turn calls 2 BUILT-IN (developed by MICROSOFT) Flow "Actions": 

1. One "Compose" Flow Action which CONVERTS the Base64-encoded image content stored by a camera (running the PowerApps app) into binary format native to the image being a "JPEG" image; and 

2. One "SharePoint > CreateFile" Flow Action, which uploads this now-converted image content into SharePoint. 

 

NO "custom API" is being called; in other words, FEEL FREE to use this solution with CONFIDENCE ! 

 

Kudos again to the YouTube video creator, and whoever he worked with (presumably at Microsoft) to uncover the amazing built-in "DataUriToBinary()" API call which is the keystone to this solution ! 

 

-Mark in North Aurora

lorenz
Level: Powered On

Re: Send a picture from powerApss to SharePoint

Hi, 

my problem is, that my picture (jpg) was Uploaded in to Sharepoint from Powerapp. But the "Image" is not stored as a Image but as a empty/corrupted file. 

Can You please help me?

Best regards and I am looking forward to hearing from you,

 

Lorenz Aichner.

sjoepcoup
Level: Powered On

Re: Send a picture from powerApss to SharePoint

Hello Lorenz,

 

You must put in your flow this piece off code:

 

1. Powerapps trigger

2. Compose inputs = dataUriToBinary(triggerBody()['File from PowerApps'])

3. Create File Sharepoint: FileName = File from PowerApps

                                          File Content = Output from Compose

4. Add attachment: Id = ItemId from Create File Sharepoint

                   Message = File from PowerApps

5. In PowerApps button On the Select Button = FotoofPenInput.Run("Handtekening.jpg",First(Fotoscol).Url,"testing") 

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,920)