Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Automatically create new folder in one drive by picking up the subject of email attachment

(0) ShareShare
ReportReport
Posted on by 6

Whenever a new mail arrives on outlook with an attachment I want that a new folder is created with the name of the subject line.
So I don't have to create a new folder every time when a new mail arrives.

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Automatically create new folder in one drive by picking up the subject of email attachment

    @gauravana3 

    Easiest Solution would be to create a single folder and save the files in it.

     

    So, wanted to ask will the subject be similar for many emails? Then those will be saved in that previous folder only. No new folder will be made. Or if the subject has slight differences, before saving the files, you can use a condition to check if that subject related folder is already there in onedrive or not with contains in the condition. 

  • gauravana3 Profile Picture
    6 on at
    Re: Automatically create new folder in one drive by picking up the subject of email attachment

    Thank you that solved my one problem.
    But suppose I get four types of attachments and in total approx 50 attachments/month. Even If I create 12 folders manually.
    Then the problem is I have to create a 4types*12months=48 flows.

    Is there anyway you can help me find an easier solution?

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Automatically create new folder in one drive by picking up the subject of email attachment

    Hey @gauravana3 

    There is no direct function in one drive connector to create a new folder. But you can do this when creating a file, you have to give a path to it.

    So lets say there is a folder called Documents. Inside that you have to make a folder by your subject name.

    You can do the following:

    Sundeep_Malik_0-1663655006581.png

    This will create a new folder with the name of your subject value.

     

    Also adding a link to a blog related to this:

     

    Power Automate: Create a folder in OneDrive - Manuel T. Gomes (manueltgomes.com)

     

    I hope this helps.

     

    If this helped you, do accept it as a solution. 

    Thanks. 

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >