web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to? via workflow a...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 4

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

archive_to_document_library.PNG

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

  • learner38 Profile Picture
    4 on at

    Hello @yashag2255 

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

    Archive2.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard