web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
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?

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    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

     

  • MJK2 Profile Picture
    4 on at

    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,185 Most Valuable Professional on at

    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

    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,185 Most Valuable Professional on at

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

    replace(<folderUrl>, ' ', '%20')

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard