cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
luisdpp
Frequent Visitor

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
v-yamao-msft
Community Support
Community Support

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
abm
Super User III
Super User III

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!

Learn more from my blogPower Automate Video Tutorials
luisdpp
Frequent Visitor

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.

v-yamao-msft
Community Support
Community Support

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

Thanks you so much. You help me so much.

Waterbizzle
Frequent Visitor

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

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

Anonymous
Not applicable

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.

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,730)