Skip to main content

Notifications

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
    mrandall86 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
    David_MA 8,219 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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard
Loading complete