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 / When folder created in...
Power Automate
Unanswered

When folder created in SP, create in another SP with same name, copy specific folders to new folder

(0) ShareShare
ReportReport
Posted on by 1
I'm struggling with this big time. It's my first flow and really need help please. I think this is going to have to be two Flows, but I'm not sure and finding this quite a lot more difficult that I thought it would be.  I've tried a few of the previous posts here for help but can't find what I need.
 
I want to:
1. When a folder is created in a specific path in a SharePoint document library
2. Copy the name of that folder.
3. Create a new folder in a different SharePoint document library with the same name.
 
Then
4. When a folder is created in a specific path in a SharePoint document library
5. Copy the contents of that folder to the newly created folder (Step 3 above) in the SharePoint document library .
6. Create a Sharing link from the  newly created folder.
7. Email the Sharing link.
 
 
Example:
Source SharePoint: HR
   Source Library: Documents
   Source Folder: Pay\FY25

Destination SharePoint: Directors
   Destination Library: Documents
   Destination Folder: Pay\FY25
 
So if a folder is created in the Source called "Pay Scales", then create a new folder in the Destination also with the same name (Pay Scales) - but don't copy the data.
Then, if a folder is created in the Source "Pay Scales" folder, with a specific name (e.g. "ASO6\Grade1"), copy that folder (and all sub files/folders) to the "Pay Scales" folder in the Destination.

So I would end up with a folder (and contents of that ASO6 folder) in the destination SharePoint site that looked like this:
   Destination SharePoint: Directors
   Destination Library: Documents
   Destination Folder: Pay\FY25\Pay Scales\ASO6\Grade1

But it would'n't copy a folder called ASO6\Grade2 (or something else).

Thanks in advance.
 
 
Categories:
  • abc 123 Profile Picture
    789 Moderator on at
    The first question you need to ask yourself is, "Why do I NEED to use folders?"
    If the answer is, "Because of security", then continue. Any other answer, consider adding metadata to the document libraries and never deal with folders.
     
    The things available to you regarding Folders are:
    1. triggerOutputs()?['body/{Path}'] 
     
     
    3. If you use the Get Items action, and add this to the Filter Query, it looks at just folders:
    startswith(ContentTypeId,'0x0120')
     
    4. There's a Create New Folder Action
     
    With these thing, you can cobble together a routine that:
    a. Get the current folder
    b. Check if the destination folder exists
    c. Create new folder when needed
    d. Copy/Move the document to that new Folder
     
    If you need to do any string manipulation, use functions like substring, left, right, mid, etc.
     

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
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard