cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thomas12
Regular Visitor

Email Attachment Flow HELP !!!!!!!!

How do I build a flow to save all email attachments to a new FOLDER that is named depending on the sender?

So example ....... @TomSmith sends an email to me with 2 attachments and the flow creates a new folder in SharePoint named Tomsmith and downloads both attachments to the folder.  

1 ACCEPTED SOLUTION

Accepted Solutions
v-LilyW-msft
Community Support
Community Support

Hi @Thomas12 

Has your issue been solved?

I created a simple flow. You can refer to the following:

vLilyWmsft_0-1625638125605.png

Use the following formula to get the sender’s name.

Expression:first(split(triggerOutputs()?['body/from'],'@'))

vLilyWmsft_1-1625638125610.png

When LilyWang send an email to me with attchments as below:

vLilyWmsft_2-1625638125613.png

The attachments will be created to the Folder named LilyWang

vLilyWmsft_3-1625638125615.png

Hope the content above may help you.

Best Regards

View solution in original post

4 REPLIES 4
tom_riha
Super User
Super User

Hello @Thomas12 ,

you can add the name of the user to the file path. If the folder doesn't exist, Power Automate will create it automatically, e.g.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

This didn't seem to work. I need each attachment in its own subfolder. It just keeps putting all the attachments in the same folder. I need subfolders created according to the sender of the attachment.  

It was just an example, use the ‘From’ dynamic content in the folder path, not the ‘User name’. 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
v-LilyW-msft
Community Support
Community Support

Hi @Thomas12 

Has your issue been solved?

I created a simple flow. You can refer to the following:

vLilyWmsft_0-1625638125605.png

Use the following formula to get the sender’s name.

Expression:first(split(triggerOutputs()?['body/from'],'@'))

vLilyWmsft_1-1625638125610.png

When LilyWang send an email to me with attchments as below:

vLilyWmsft_2-1625638125613.png

The attachments will be created to the Folder named LilyWang

vLilyWmsft_3-1625638125615.png

Hope the content above may help you.

Best Regards

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.

Users online (5,389)