Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Linking to folder

(0) ShareShare
ReportReport
Posted on by 4

Hi! I'd like to send an automated notification after a specific file was added in a SharePoint folder, in my case an agenda for a meeting, with a link to that specific folder.

 

I managed to automate that an e-mail is sent after a file was changed, but I only found out how to include a link in the mail to that specific file. However, I'd like a link to the folder, so that users will end up in the folder and see all files. It's of course not a static folder; for each new meeting I create a new one. How can I make a 'dynamic' link to the folder to put in my mail?

 

Btw, I tried this solution: Solved: Link to folder instead of link to file - Power Platform Community (microsoft.com). It gives an error that a file is missing. Perhaps because it works with lists, and not the document library that I work in?

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Linking to folder

    If you want to show the full link in the email, then just replace the space with %20

    replace(<folderUrl>, ' ', '%20')
  • MJK2 Profile Picture
    4 on at
    Re: Linking to folder

    Hi @tom_riha,

    I understood what %20 means. But please have a look at the two pictures; the problem is that the output doesn’t contain %20 between ‘shared’ and ‘documents’, resulting in an incomplete url. The clickable link stops after ‘shared’ (in Dutch: 'Gedeelde').

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Linking to folder

    Hello @MJK2 ,

    %20 is url representation of a space - if you use space in browser it'll automatically replace it by %20 as url can't contain spaces.

    Yes, you can use the output in a hyperlink, but since it's dynamic you'll have to create the email using the HTML editor to be able to add a dynamic hyperlink.

  • MJK2 Profile Picture
    4 on at
    Re: Linking to folder

    Hello Tom,

     

    Thank you for coming to my aid. I think you set me on the right path and I'm close to the finish. There are two remaining issues. Firstly, it seems that the url doesn't generate a spacing. The library has a parent folder called 'shared documents', in the url I see it written as 'shared%20documents'. The trigger output is a literal spacing and there's an underline right up to that spacing:

    MJK2_2-1677433134972.png

     

    Lastly, the result is a very long url. It'd be nicer if I can shorten this url, and the best way I can think of is by 'attaching' it to text, like <a href="url">Here</a>. How can I use the output in this way?

    MJK2_1-1677432789143.png

     

    Thank you very much in advance!

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Linking to folder

    Hello @MJK2 ,

    the trigger (or 'Get file properties' action if it's not in the trigger) should give you the file 'Folder path' property with the site relative path to the folder, e.g.

    Shared Documents/PDF files/Subfolder/

    You can take it and concatenate it with the concat(...) expressions to the SP site url (which should be fixed within the flow).

    concat('https://xxx.sharepoint.com/sites/siteName/', triggerOutputs()?['body/{Path}'])

    image.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1