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 Platform Community / Forums / Power Automate / Dynamically create a f...
Power Automate
Unanswered

Dynamically create a folder with multiple subfolders with multiple subfolders

(0) ShareShare
ReportReport
Posted on by 82

So I have a share point list that contains the following columns.

 

Year

Month

Day (Monday to Sunday)

 

I would like to create a folder system on Power Automate such that when I run my flow, it creates a unique folder for each year, month and day. If a folder already exists, then don't do anything. For example if I already have a folder called 2022 then skip. If I already have a folder called January in 2022 skip. If i already have a folder in January called Monday then skip.

 

For example,

 

2022/January/Monday

2022/January/Tuesday

...

2022/March/Monday

 

Is this possible?

 

Categories:
I have the same question (0)
  • Verified answer
    GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    HI @User_Naami ,

     

    You can use easily the Create new folder action. 

    SharePoint will skip an already existing folder by default.

     

    Please think about when you have not a String column to convert the value to string with string().

     

    A Flow can look like this 🙂 I simply used the action When an item is created 

     

    concat(triggerOutputs()?['body/Year'],'/',triggerOutputs()?['body/Month'],'/',triggerOutputs()?['body/Day'])

     

    GeorgiosG_0-1654091973836.png

     

  • User_Naami Profile Picture
    82 on at

    Hi Thank you for that, it worked! 

     

    Just a really quick question. Suppose I have created a file down my flow and then would like to move that file into the folder (the day folder that is linked to a dynamic content) how would i go about doing that? 

     

    I've tried this.

    User_Naami_0-1654111213244.png

     

  • Verified answer
    GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    Great that it works for you !

    You can use the same concat but you have to insert the library name in front.

    I.e. 

    /Shared Documents/2022/February/Monday

    You can achieve this with concat again.

     

    concat("/Shared Documents/",triggerOutputs()?['body/Year'],'/',triggerOutputs()?['body/Month'],'/',triggerOutputs()?['body/Day'])

     

    Or retrieve the library name dynamically if it is necessary. 

  • User_Naami Profile Picture
    82 on at

    Thank you, I manage to figure it out as soon as i posted the reply haha. But nevertheless thank you for your help! 

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