cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
v-yuazh-msft
Community Support
Community Support

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
v-yuazh-msft
Community Support
Community Support

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

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

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (57,382)