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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dynamically getting Fo...
Power Automate
Answered

Dynamically getting Folder name in Sharepoint

(0) ShareShare
ReportReport
Posted on by 22

Hi Everyone,

 

I have a serial approval flow that is deployed on multiple lists and libraries. It is triggered manually on selected item. I was recently asked to add the link of the folder where the item is in the email that approver receives. I cannot find a way to add folder link dynamically to the mail. 

 

Is there a way to capture the folder of the list item the flow is triggered on?


Thank you

Categories:
  • Verified answer
    ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @hkhan :

     

    The following expression should give you a link to the folder:

    substring(body('Get_file_properties')?['{Link}'],0,lastIndexOf(body('Get_file_properties')?['{Link}'],'/'))

     

    To insert a hyperlink in the email, simply wrap the expression above inside of a hyperlink tag and set the "is HTML" property of the email to true.

     

    The Link to Item Dynamic property returns the fill path and file name.

    The expression first finds the last instance of a backslash in the item link - that is where you want to cut the text.

    The substring expression is used to "cut off" elements at a specified length.

     

    Please give it a try and let me know if this works for you.

     

    If this solves your issue, please mark your post as Solved.

    If you like my solution, please give it a Thumbs Up,

     

  • Elia Profile Picture
    61 on at

    It will be great if Microsoft created a Flow to call other flows, or the possibility to use one Flow across multiple Libraries / Sites.

    With dynamic update of Site / Library fields.

     

    The idea has been already proposed, and needs sufficient number of Votes for it to be considered..

    https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Deploying-a-Singular-Flow-across-Multiple-SharePoint-Sites/idi-p/344359

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard