cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

create new folder

I have a flow When a New Email is Created with an attachment, it copies the attachment to a Document Library.    I need to be able to have flow create a new folder based on part of the file name which contains the date.  For instance in the following file names (HEB Weekly Vault Report201805130015, Raleys Weekly Vault Report201805130030), the folder need to be called 20180513;   There are ~25 different files but each week it contains the date in the file.  How can I have Flow create a folder based on the date that is in those files?   Also when the files comes into Outlook, it has a %20 for any spaces in the name.  Is there a way to have Flow remove the spaces when it gets copied over to the Document LIbrary?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: create new folder

Hi @  Christinet,

 

 

Do you want to create a folder in a sharepoint libarary when email with attachment arrives,and the folder name would be the date in the attachment name?

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG

 

Note:

1.The expression in the folderName(Compose 2) action as below:

substring(first(skip(split(outputs('Compose'),'Report'),1)),0,8)
2.Choose the Output dynamic content of the folderName action in the Folder Path of the "Create file" action.
 
The flow would run successfully as below:
Capture.PNG

 

For your question to have Flow remove the spaces when it gets copied over to the Document LIbrary,

I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Regards,
Alice Zhang

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: create new folder

Hi @  Christinet,

 

 

Do you want to create a folder in a sharepoint libarary when email with attachment arrives,and the folder name would be the date in the attachment name?

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG

 

Note:

1.The expression in the folderName(Compose 2) action as below:

substring(first(skip(split(outputs('Compose'),'Report'),1)),0,8)
2.Choose the Output dynamic content of the folderName action in the Folder Path of the "Create file" action.
 
The flow would run successfully as below:
Capture.PNG

 

For your question to have Flow remove the spaces when it gets copied over to the Document LIbrary,

I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Regards,
Alice Zhang

View solution in original post

Anonymous
Not applicable

Re: create new folder

This is exactly what I was looking for!! It works like a charm, had a few errors but figured them out.  Thank you for the steps and the screen shots, the screan shots really helped.  

 

Thank you again, really appreciate it!!

Anonymous
Not applicable

Re: create new folder

One other question....  I added a "Send an Email" to the same flow and in the body of the Email, I would like to include the URL of the newly created folder (example  https://mysite/sites/US/20180601/).  Question is .. I thought I could just add the URL + the Output parameter but it leaves a blank space between the URL and the newly created folder (

https://mysite.sharepoint.com/sites/NE/AppResponse%20Reports/US/  20180601).  How can I include the entire URL to the newly created folder?

SEnd Email_ Include LInk.png 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 232 members 5,338 guests
Please welcome our newest community members: