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
Community Support

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
Community Support

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,242)