How to create nested folders in SharePoint and Copy templates automatically using Power Automate?

I’ve been talking a lot about automatic documentation, and it’s a topic that I’m more and more interested in. Having incomplete or no documentation is something that 99% of the people I talk to complain about and admit that doing documentation is boring. I want to focus on how to copy templates automatically and how to create nested folders and get your “work environment” ready.

Let’s explore each individually, but first mention that I use Power Automate for the automation part, but you can use any other tool that you see fit. The point is to focus on the process, not on the tools.

Create folders automatically

Like I mentioned before, one of the essential concepts about automatic documentation is to have only one place for your information. You can have multiple tools but have only one place for each topic. For example, you can have Microsoft Teams for the “temporary” documents and collaboration, a SharePoint Communication Site for the “public” final documents, and a SharePoint Team Site for the “private” final documents.

Having a way to do all of this automatically is essential because you don’t want to create folders and sub-folders manually. There are a lot of strategies, but here’s what I prefer:

  1. Have a central point for submitting information. For example, if you have ideas for articles and have different sections, have a Power App, Microsoft Forms, or something else that can collect the ideas quickly.
  2. Have a central place that collects that information and creates the folder for you. In our case, a Power Automate is ideal for this.

Let’s see an example. For this, I’ll use Microsoft Forms and Power Automate.

Collect Ideas

The form doesn’t need to be complex. The idea is to capture information quickly.

You can then have a Power Automate that gets the information and creates the folders for you:

Let’s fill in the Form:

The Flow runs correctly:

And you have a nice folder structure to start

You have now a complete solution from idea to folder structure and all it took was 10 minutes work.

Add templates

Now that you have the folder structure, it’s important to have everything you need to start writing. This means populating the main folder with sub-folders, files, and any other things you need. This furthers the automation process and will enable you to have an idea, write it quickly and have everything ready for you to start writing.

Let’s think about what we need:

  1. We need two folders for the screenshots—one with the “raw” ones and the “converted” ones to upload.
  2. If you’re using markdown, you can have a “template.md” or a word file with the skeleton of your article.

Let’s create a template folder:

I have template folders for a reason. I can change the folder structure, improve the templates, add new files, and don’t need to change the Flow. Also, I only have one action to copy the entire folder, so I “just” need to change things in one place.

Let’s see now how to copy templates automatically. We only need to add one more action to the Flow:

Let’s submit another idea and see what we get:

Here’s the Flow result.

And when we check our folder. 

Final thoughts

Things like this are where automation shines. You can get from idea to folder creation in about 15 minutes of work, saving you hours of “create file” and “copy and paste.” The is an illustration but try to look at your workflows and see where you can create templates and simple Flows to create the information created for you automatically.

Have a suggestion of your own or disagree with something I said? Leave a comment or interact on Twitter and be sure to check out other SharePoint-related articles here.

Photo by Sigmund on Unsplash

Manuel Gomes

I have 18 years of experience in automation, project management, and development. In addition to that, I have been writing for this website for over 3 years now, providing readers with valuable insights and information. I hope my expertise allows me to create compelling, informative content that resonates with the audience.

View all posts by Manuel Gomes →

Leave a Reply

Your email address will not be published. Required fields are marked *