cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ppl
Helper V
Helper V

Upload file to SharePoint from PowerApp and send email with link to this file

Hello.

I am using this instruction to upload files to SharePoint document library with using a flow.

 

https://www.youtube.com/watch?v=5XsWgVnR7SU 

 

And I need to send a link to this file, which I have just uploaded.
I am trying to use Last(Contracts).'Link to item' in email body, but it works time to time, and sometimes it is not last file from my library.
I need to send a link to a file which I have just uploaded.

1 ACCEPTED SOLUTION

Accepted Solutions

@ppl 

 

Use "respond to powerapps" action in your flow and pass the URL back to powerapps.

 

View solution in original post

7 REPLIES 7
PowerRanger
Resolver II
Resolver II

Hi @ppl ,

 

in the flow after the "create file" action you could add a Send Mail action. Note sure what you get as a response from "create file" but if there is no URL to the file you probably need to add an action "get file properties" and use the ID from the "create file" response to receive the properties. This action will contain a URL to the document in the response. 

@PowerRanger 

I need to get this link on the next screen in my app after uploading, not in flow, because I need to enter email of the person who must get this link.

@ppl 

 

Use "respond to powerapps" action in your flow and pass the URL back to powerapps.

 

View solution in original post

@ppl 

 

As mentioned before you need to add a action "respond to powerapps or flow".  Add a Text Output and name it "urlNewFile" and use the Path responce from the create file action.

 

In PowerApps you need to call your flow like this

Set(myResponse,power.Run().urlNewFile)

 

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.

SharedScreenshot.jpg

If I am trying to use respond to powerapps there is an error

@ppl 

 

You can't place a respond to powerapps action in a ForEach Loop. In this case you need to create an aaray variable before the ForEach action. Within the ForEach you need to add the response from create  file to the array.

 

After the ForEach Loop you add a respond action and pass the array back to powerapps.

@PowerRanger 

What action you mean response from create  file to the array? I made like this and see the same error.

And what value I need to put in Respond To Powerapp value?Screenshot 2020-10-26 171823.png

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (47,606)