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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a Folder Stru...
Power Automate
Answered

Creating a Folder Structure based on Subject Line

(0) ShareShare
ReportReport
Posted on by 11

So I am trying to use Power Automate To save the attachments in a email to a folder structure that is created each time a new email arrives based on the Subject line.  Each email arrives like this.  Blend Sheet Attached STULL, LONNY - HOME NORTH 2018 - WBV25SW7.  I would like the Folder structure to then look like this.  /Stull, Lonny/WBV25SW7/Rx/  And the attachments to then be saved in the RX folder.  I got a lot of the rest figured out.  Anyway thanks in advanced for helping.

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @tdktyson 

     

    I don't believe you can have folders with commas in them.  You can replace the - with / replace the , with nothing and use it in the create folder action like so:

    DamoBird365_0-1643224384480.png

     

    This created the following path:

    DamoBird365_1-1643224421917.png

     

    Please consider accepting my answer as a solution if it helps to solve your problem.

    Cheers
    Damien

    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts, or take a look at my website. Thanks

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @tdktyson 

     

    Quick update - you can have , in the path.  Just tried it.

     

    replace(outputs('Compose-Subject'),' - ','/') is my new expression.
     
    DamoBird365_2-1643224544773.png

     

    Damien

  • tdktyson Profile Picture
    11 on at

    I think I almost got it.   But it is not separating into the sub folders.

    tdktyson_0-1643227406553.png

     

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @tdktyson 

     

    Are you using replace(outputs('Compose-Subject'),' - ','/') but instead of it being based on the compose, you run it on the subject and then use the output for the folder path, not the original subject, which you might be doing.

     

    Damien

  • tdktyson Profile Picture
    11 on at

    I am here is everything I have so far

    tdktyson_0-1643229186073.png

     

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @tdktyson 

     

    This is what you are looking for:

    DamoBird365_0-1643229648531.png

    What does your flow history look like?

     

    Damien

  • tdktyson Profile Picture
    11 on at

    tdktyson_0-1643230344907.png

     

  • tdktyson Profile Picture
    11 on at

    Never mind thank you so much had the wrong output in the folder line.  Thanks again!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard