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
Super User
Super User

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
Super User
Super User

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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,798)