Showing results for 
Search instead for 
Did you mean: 

Retrieve URL of Doc in SP Doc library in order to add the URL of the Doc to an SP List

I have already posed this question in the Flow forum and was informed this funtionality is not currently supported i.e. it's not possible to retrieve the URL of an SP document hosted in an SP Doc library.


This would be really usefull, given that it's not possible at the momment to have an attachment in PowerApps, and to upload that attachment to a Sharepoint Doc library.


So as a work-around, the User could upload a Document to an SP Doc library, a Flow in the Doc library could move the Doc to the Final Doc library (need to move doc to another library because of permissions), if it was then possible to retrieve the new URL of the document, we could save the URL in an SP list, so that the User would be able to click on the link to open the Doc in PowerApps.


There are many other scenarios where having the URL of the Doc would be really helpfull. So please add this to the Dynamic content that is available as part of Flow.

Status: Completed

The SharePoint connector now has an action called Get File Properties that includes a link to the item, read more here:

Frequent Visitor

This idea is similar to my needs.  We've been testing out the Approval email in Flow and it does not send the link to the document to the user who needs to read it to either approve or reject it.  So, the ability to add the link to the SP document is paramount since the approval process is useless without this.

New Member

We are have a Team Services trigger on the creation of a Work Item. This creates a document in SharePoint and we need the URL of the document to put it in the email and the work item.

Not applicable

I am highly surprised that something as necessary as the link to the document to be approved is not available to add to email body to be sent. Totally defeats the purpose.



New Member

Agree completely with all the comments here.  I've also tried entering a URL to a document library so that an approver can at least get directed to the library, to a 'pending approval' view, but the URL just shows up as text and is not clickable.

Advocate I

Agree completely with all the comments here. I'm trying to rebuild the URL with the information at disposal but it's really defeating the purpose of the flow...

Kudo Kingpin

@Jgay it's now possible to get the link (depending on the scenario), for example if you're triggering a Flow by one of the Sharepoint Triggers, you could use "Sharepoint - When a file is created(properties only)" trigger, and this exposes the link as "Link to item".

Not applicable

 Link to Item doesn't work in the approval email. Pretty much all dynamic text fail within the approval description/details

Advocate I

I did manage to get something working by construction the link by hand. In fine I only need the file name as I know where it is created or modified.


Here is my content for the "link to element" box : "Path to File"​ (dynamic field)


I hope that can help.

Regular Visitor

Thanks Jgay for the formula.

Unfortunately, this doesn't work if the document name contains spaces.

Having the file url as a dynamic content is a must.



Regular Visitor

For document names with spaces, we can use the formula:

replace(concat('<site url>',triggerOutputs()['headers']['x-ms-file-path']),' ','%20')