Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How to? via workflow automatically archive mails (incl attachments) in sharepoint document library

Hello, would need help to adjust attached workflow as don't get the expected results.

Objective: automatically archive emails with a specific subject to a share point document library(2 separate folders). Not only the attachments but as well the body of the mail. Message is coming in the right place but cannot open it from there (trying with .eml & .mht as mail format  thanks for your tips


Dual Super User III
Dual Super User III

Hey @learner38 


You are doing the iteration part all wrong. You should not iterate over the attachments to save/ export the email. 


What you can do is, initially have the when an email arrives trigger and then add an action to export that email and then the sharepoint action to create file. In the create file action, the filename should be xyz.eml and the content should be the body from the Export Email dynamic output options. 


For the attachments, you can then have the step of condition to check if there are attachments, Has Attachments is equal to true and then for each attachment, get attachment content action in the loop and create a file action in that loop itself. Makes sense?


Hope this Helps!


If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!


Hello @yashag2255 

flow is failing. May I ask you your guidance. Thanks


Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (12,980)