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 / Create folders based o...
Power Automate
Unanswered

Create folders based on excel list, skip duplicates

(0) ShareShare
ReportReport
Posted on by

I have got a flow where two folders are created based on an excel sheet. A name is picked up from the excel sheet and with that name the folders are created. So far so good.

 

What I mis in my flow is to be able to rerun the flow were only the new names are added, the already created ones will be left untouched.

 

NICE TO HAVE: Deleted names in the excel will also result in removing the folder.

Categories:
I have the same question (0)
  • Unknown geen idee Profile Picture
    1,757 on at

    Dear Nielsmans,

     

    If you keep a different excel 'LastVersion' and compare this in your flow to the current version you can figure out which items are new/deleted and base your actions on this accordingly.

     

    Happy flowing,

    Koen

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Are you creating your folders all at the same level, or will some of them be sub folders?

  • Community Power Platform Member Profile Picture
    on at

    Yes, they are created at the same level. 

  • grantjenkins Profile Picture
    11,063 Moderator on at

    This is how I would build my flow.

     

    For this example, I'm using the following list:

    grantjenkins_0-1669879045346.png

     

    And Excel Table:

    grantjenkins_1-1669879075686.png

     

    Below is the flow. I'll go into each of the actions.

    grantjenkins_2-1669879120599.png

     

    Recurrence will run the flow on a schedule. I'm assuming you already have this setup.

    grantjenkins_3-1669879222817.png

     

    List rows present in a table will retrieve the rows from the Excel Table.

    grantjenkins_4-1669879267250.png

     

    List folder will retrieve the top-level folders from my folder No Duplicates (in this example).

    grantjenkins_5-1669879382081.png

     

    Select builds a simple array with the name of each folder retrieved from List folder. Note that Map is in text mode in this example, so we get a simple array of values (folder name) instead of an array of objects.

    grantjenkins_6-1669879463060.png

     

    Filter array will filter out any folders from the Excel Table that already exist in SharePoint. This will leave us with an array of only the folders that we need to create.

    grantjenkins_7-1669879629957.png

     

    Apply to each takes in the output from Filter array, and Create new folder will create a new folder for each item in the array. The expression used for the Folder Path is below. Note that I've used 'Folder' because that's the name of my column in my Excel Table.

    items('Apply_to_each')?['Folder']

     

    grantjenkins_8-1669879747411.png

     

    And that's it. In this example, we would end up with the following:

    grantjenkins_9-1669879868423.png

     

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard