Create a file and folder then move created file into that folder

Brass Contributor

Hello All,


I have a case where I need a power automate to create a file  and folder in SharePoint site and then move the created file into created folder..


I have followings:

A SharePoint list

Customer Exist: Yes, No

Customer name: List of customers(only one customer can be selected)

Few other fields (which are not important here)



If a user selects the Customer Exist: "Yes". 

Flow will create a file and move the file into the folder. The folder name is the same as the customer name.

If user selects Customer Exist: "No"

Flow will create a file and a folder(Folder name will be the same name as customer name), then move the created file into the created folder at this step.


Looking forward to hearing from you.



1 Reply



List - Test2

Customer: Lookup field to Customers 

Customer Exists: Choice Yes or No 


Library - CustomerFolders


Does the flow run- when an item is created, or modified, or when a condition is met? You'll need the right trigger and maybe a trigger condition.  I set it to manually start and you enter the ID.


Create the content for the file.  We'll use this to create a text file.



Create a variable for the folder path - /DocumentLibraryName/CustomerName



Use a condition to see if the customer exists.  

Check to see if the Customer Exists = Yes

If yes, create the file.

Otherwise, create the folder, then create the file in the new folder.



Hopefully this is enough to get you started.  There is a great Power Automate community here.