Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Create file in SharePoint - dynamic folder name contains

(0) ShareShare
ReportReport
Posted on 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 at
    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,929 on at
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard