cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tdktyson
New Member

Creating a Folder Structure based on Subject Line

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8
DamoBird365
Microsoft
Microsoft

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

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

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

tdktyson_0-1643227406553.png

 

DamoBird365
Microsoft
Microsoft

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
New Member

I am here is everything I have so far

tdktyson_0-1643229186073.png

 

Hi @tdktyson 

 

This is what you are looking for:

DamoBird365_0-1643229648531.png

What does your flow history look like?

 

Damien

tdktyson_0-1643230344907.png

 

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

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (5,472)