web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

create new folder

(0) ShareShare
ReportReport
Posted on by

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?

I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at
    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

  • Community Power Platform Member Profile Picture
    on at
    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!!

  • Community Power Platform Member Profile Picture
    on at
    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 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard