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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,961)