Showing results for 
Search instead for 
Did you mean: 
New Member

Flow to create sharepoint folder dynamically named from email subject

Hi i'm new to Power Automate and i would like to create a flow that goes as follows:


1) Receive specific type of email for my business (that has attachments)

2) Create a new folder with that same emails attachments within my sharepoints 'DOCUMENTS" folder/subfolders 


 I'd essentially get a client quote submission request email and i'd simply re forward it to myself renaming the subject line to the folder name i'd like in sharepoint ... i'd like a NEW FOLDER created for each email with the attachments and base the name of the folder on the subject line of the email:


- Email comes in from a client ...

- I forward it to myself (that's a constant i can control rather than every email received creating a new folder sharepoint) 

- I edit the subject line of that email to the title of the folder (i.e. Rockhill Properties, LLC) -- i'd like that folder to appear in my sharepoint library and include the attachments from that email within it.


Is this possible?


To make it even more complicated .... 

Is it possible to point each one to one of 3 different subfolders i have too? -- as in 

1) Documents > 2020 New Business > A - I

2) Documents > 2020 New Business > J - R > Rockhill Properties, LLC (including attachments from that email)

3) Documents > 2020 New Business > S - Z 


(those are 3 sub-folders within my main DOCUMENTS FOLDER --- so 'Rockhill Properties, LLC' i'd like to have it created in the 'J-R' folder if possible) ... I could get another client submission called 'ACME Realty INC' and that would go into sub-folder A-I.


That's probably a bit too complicated but if not any help is appreciated and i appreciate your patience and guidance!

Memorable Member
Memorable Member

Hello @jeffk202 

Your scenario looks doable. As your are always forwarding the email with a new subject to yourself, there is a possibility to identify those emails from other emails that arrives in your inbox.


Start with a trigger action "When an new email arrives in ..." and specify yourself as the To and From email addresses, and only with Attachments set to Yes. Suggest to also set Yes in Include attachments.


Take the email subject and based on the first character decide the folder path in which to place the attachments.

Check that the folder path is valid, exists - as if it doesn't, it is better to create it 🙂


Now loop through each attachment and save each in the folder path location.


Try it out and let's know how it goes. Kind regards, John

Awesome thanks so much for the help. I'll try to find time this weekend to mess around more with this. I had given up and you have given me confidence it is doable. This is the very first time i've ever even tried to make a flow ... but i'm a good 'googler' to figure things out. Appreciate the help. If i get it you'll be hearing from me. Thanks again. @John 

Helpful resources



Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (2,261)