cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Santosh_M
Helper III
Helper III

Triggering a FLOW through Powerapps

Hi,

I have a simple requirement to copy a file from one document library to another library in SharePoint. I want to achieve this via click of a button on PowerApps as we dont want to expose entire SharePoint to users?

 

Has anyone done this? Thanks in advance.

 

Thanks,


Santosh

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

The app is a simple one. User has to select the relevant file from dropdown and then click submit. Then the flow will trigger to copy the selected file to another document library. Attached is the image for the same.

PA3.PNG

 


@v-bacao-msft wrote:

Hi @Santosh_M ,

 

Could you tell us about the main features of the app? Could it submit an item id?

As described by @Pstork1 , if you want to get the attachment contained in the specified item, you need to get the specified item id.

Then configure the following Action, you could get all the data directly through the ID.

Like:

20.PNG

 

Best Regards,


 

View solution in original post

11 REPLIES 11
Pstork1
Dual Super User
Dual Super User

The problem with your scenario is that the user running the PowerApp would need to have permission to both libraries to do the copy even with a Flow. A Flow that is started from a PowerApp runs in the context of the user running the PowerApp.  So to copy a file using a Flow you would need to have access to both libraries.  I assume that is not what you want since you talk about exposing SharePoint to all users. There are workarounds, but they cost additional money in terms of licensing and usually lead to an overly complex system.  PowerApps and Flow really aren't designed to function with SharePoint without giving users access to the underlying data.

 

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Providing access to both libraries is not a concern. We want to provide a simple layout for end users to use rather than lenghty sharepoint list. 

I checked other posts on this forum and saw some people achieved it. I am currently struck work ID issues which is not being pulled from Powerapps to FLOW. Any help on this is appreciated.

To pass a paraameter for the flow when you click the button edit the flow, initialize a parameter of the data type that you need and pick Ask in PowerApps from the dynamic content list to set the value of the variable.  This will create a parameter for the Run statement in the onSelect button in Powerapps.  Just add the value to the run() in PowerApps and you will now have the data in Flow.  After that it will show up in the Flow dynamic content, and you can delete the variable if you want.  The variable is just a way to make sure you get the correct data type when creating the parameter.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I tried the steps you mentioned and hit a roadblock. That is due to my limited knowledge on FLOW and Powerapps and in general.

 

Attaching the steps i used here and let me know if i am missing a step.

 

PA.PNGPA2.PNG

Are you trying to copy a file from a library or attachments from a list item?  For attachments you need to supply the ID of the List Item as the parameter from Powerapps. That's an integer.  Then you can use the Get Attachments action to get the documents. It looks like you have Powerapps passing the actual document.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Santosh_M ,

 

Could you tell us about the main features of the app? Could it submit an item id?

As described by @Pstork1 , if you want to get the attachment contained in the specified item, you need to get the specified item id.

Then configure the following Action, you could get all the data directly through the ID.

Like:

20.PNG

 

Best Regards,

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

Hi,

 

The app is a simple one. User has to select the relevant file from dropdown and then click submit. Then the flow will trigger to copy the selected file to another document library. Attached is the image for the same.

PA3.PNG

 


@v-bacao-msft wrote:

Hi @Santosh_M ,

 

Could you tell us about the main features of the app? Could it submit an item id?

As described by @Pstork1 , if you want to get the attachment contained in the specified item, you need to get the specified item id.

Then configure the following Action, you could get all the data directly through the ID.

Like:

20.PNG

 

Best Regards,


 

As asked earlier is the file stored in a document library, as a list attachment, or somewhere else like their local hard drive or a network share?  The Flow is a little different depending on where the file is stored.  If you'll provide that information I'll walk you through how to pass the parameter from powerapps and what the flow looks like.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks all for the help. It helped in solving the issue. Also i had to tweak a bit of my PowerApps Run option to include the ID. 

Hi @Santosh_M ,

 

It appears that you have found a solution to your issue!

If so, please click "Accept as Solution" on the reply that describes how you were able to solve your issue!

This makes your post much easier for other members of the community to see and find when looking for a solution!

 

Best Regards,

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

MOVED from ICS Forum board to Archive, looks like a response but the original post is not showing up in the thread.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,577)