Skip to main content

Notifications

Community site session details

Community site session details

Session Id : u9i0OjhkMlk/PxIqch4Ls9
Power Automate - Building Flows
Unanswered

Create file in SharePoint - dynamic folder name contains

Like (0) ShareShare
ReportReport
Posted on 14 Jan 2025 14:19:21 by 10
Hello,
 
I'm trying to use Power Automate to create a file in SharePoint where the folder name is dynamic. 

The folder name is always in two parts: [Unique ID] & [Name]. The Unique ID can always be presumed correct and unique but, the Name portion has not been produced using any strict rules.

The example below has the full folder name. 'SKSYPYCQF' is the unique ID. Is it possible to enter a folder path that would work using something like a 'Contains' operator so that I can ID the folder path with the unique ID only?
 
 
Kind Regards
Matt
  • mrandall86 Profile Picture
    10 on 14 Jan 2025 at 17:07:41
    Create file in SharePoint - dynamic folder name contains
    Hi David,

    Thanks for taking the time to have a look.

    I'm not sure your proposed solution would work. Perhaps I can explain further:

    The folders already exist and I know the first part of the folder name.
    In the example folder 'SKSYPYCQF - RandallM', I know the [Unique ID] 'SKSYPYCQF' element but, not the [Name] ' - RandallM'. The [Name] element has no naming convention.
    I think the solution below could lead to creation of multiple files that start with the same [Unique ID] and end with different [Name]s.
     
    Thanks
    Matt
  • David_MA Profile Picture
    10,301 Super User 2025 Season 1 on 14 Jan 2025 at 15:28:24
    Create file in SharePoint - dynamic folder name contains
    Use the Create a new folder action before the Create file action and create the folder every time. You can test it, but if the folder already exists, nothing will happen, and if it doesn't, it will create it. However, doing this provides the data you need. With this action, it will include the full path value, and you can use this value in the Folder Path:
     
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,692 Most Valuable Professional

Leaderboard
Loading started