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 / Get Latest Created Folder
Power Automate
Answered

Get Latest Created Folder

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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.

 

Categories:
  • Verified answer
    trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    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
    Microsoft Employee on at

    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
    16,679 Super User 2026 Season 2 on at

    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

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
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard