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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Get Latest Created Folder

(0) ShareShare
ReportReport
Posted on by

Hello,


I hope I can explain this so as to get an answer.
I have a document library called "General", which is a sub folder in my "Documents" folder.

Once a month Service Now dumps an excel file with the month and year appended as shown below.

 

What I need to do is dynamically find the first part of the URL where my Excel files reside.  

ChrisL1_0-1688491905417.png

I can get the URL by populating a variable with "strLinkToItem" but this includes the file name as well.
The file name changes so I need to get that dynamically as well in order to use Get Worksheets action.

In order to get this to work I had to hardcode the library path and then use a variable that holds the file name in order to use get worksheets action.

ChrisL1_2-1688498747842.png

ChrisL1_3-1688499033239.png

"/General/EmailMessages_6_2023" is hard coded and I need that to be dynamic.
The latest folder that was created (Because it is now July) is...
Notice the folder under General has changed.

ChrisL1_0-1688501257803.png

 


Please give me some direction if possible.

 

I have the same question (0)
  • Verified answer
    trice602 Profile Picture
    14,671 Super User 2025 Season 2 on at
    Re: Get Latest Created Folder

    Hi @Anonymous ,

     

    I ended up using this solution, let me know if this helps!  Here I grab the current date/time and then pull the month number and year number out using compose, and concat that with General/EmailMessages_ .  In my test, I was able to dynamically create that hard coded folder path using the current date.  Always glad to help!  Tom

     

    dynamicfoldername1.png

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Get Latest Created Folder

    Hi Tom,
    Thanks for your input! This looks like it could do the trick.
    I will apply this today and let you know.
    Thank you!

  • Verified answer
    trice602 Profile Picture
    14,671 Super User 2025 Season 2 on at
    Re: Get Latest Created Folder

    Thanks Chris!  If this ends up working for you, please mark as a solution so I can earn my 1st solution badge 😁 Tom

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 797 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
developerAJ Profile Picture

developerAJ 319

Last 30 days Overall leaderboard