cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BalletBob
Advocate III
Advocate III

Save email to Sharepoint document library (full email)

Hi,

 

We'd like to save a copy of an email to a Sharepoint document library for future reference. These are our outbound marketing emails and don't have attachments. We'd like to capture the body of the email, preferably how it looks in email.

 

Any ideas?

 

Thanks

 

Damien

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

The solution is pretty strait forward now.

The best practice is to combine outlook mail rules and Power Automate flow.

You can set up a folder, and use mail rule to determine which mails need to be archived (move the mail to this folder). And then in Power Automate flow, just monitor the new mails to this folder.

It will be better to add a time stamp to the file name.

 

WaleyWang_0-1625638239950.png

 

View solution in original post

18 REPLIES 18
v-yamao-msft
Community Support
Community Support

Hi BalletBob,

 

How about using a “Create file” action of SharePoint Online to save emails?
I had a flow, “when a control is selected, send email(Subject and Body were set to Ask in PowerApps), create file in SharePoint(File name and File content were set to Ask in PowerApps)”. In the App, I added one Button and two Text input(Text input1 for subject and Text input2 for Body), then added the flow to the Button. when the button was clicked, someone received the email and a file was created to the SharePoint library.
Here is a screenshot of my flow, please try if it works for you.

create file.PNG
 


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there,

 

I just wanted to update this thread.

 

It is now possible to do this within flow using Parserr. We have just joined the Flow community and wanted to thank everyone in the flow team for making this possible:

 

https://flow.microsoft.com/en-us/services/shared_parserr/parserr/

 

Parserr allows you to turn incoming emails into useful data to use in various other 3rd party systems.You can use to extract anything trapped in email including email body contents and attachments.

 

Have a look here: https://parserr.com

anyone know of a working solution? When I try this, the resulting file is a blank email file.

Anonymous
Not applicable

The solution is pretty strait forward now.

The best practice is to combine outlook mail rules and Power Automate flow.

You can set up a folder, and use mail rule to determine which mails need to be archived (move the mail to this folder). And then in Power Automate flow, just monitor the new mails to this folder.

It will be better to add a time stamp to the file name.

 

WaleyWang_0-1625638239950.png

 

I've marked this as the solution as both Teams and Sharepoint now natively support viewing MSG files which they didn't when I posted the question.

I was looking to end up with a PDF or image file but I guess I no longer need to.

This is great thanks for the update

@Anonymous trying this and getting a failure, advising me to inspect my inputs. Any thoughts on what I missed?

XSpence8_0-1659443907429.png

EDIT: Adding flow details

XSpence8_1-1659447547951.png

 

 

This worked nicely.  But there seems to be a problem.  When you open the created email in the browser (preview) it takes ages to open.  This only affect emails 'created' with the method you posted.  Actual emails dragged and dropped into sharepoint open with no problems.

 

A second issue is, if you download a 'created' email, it will not open in outlook.  Error:
"We can't open #filename It's possible the file is already open, or you don't have permission to open it."
FYI, I definitely have permissions on the file.

Any ideas on either issue?

Please note, if you have trouble opening the file (email) after you re-download it, you may want to change the file ext to .eml

 

Please see this link... Solved: Not able to open email (.msg) file locally, create... - Power Platform Community (microsoft....

I used this same flow and got a blank message

skagawa
New Member

See screen shot, Screen Shot 2023-01-25 at 8.31.54 PM.png

rceighteen0eigh
Regular Visitor

Also using the same flow but I get the same blank email as skagawa. I have tried changing the extension from .msg to .eml to no avail. Any advice would be appreciated. 

OK eventually I got this to work, though not sure what i changed or what i did. So my take away is this solution works and it was user error. 

LauraCas72
Regular Visitor

I tried to use this set up to save to One Drive, but I got an error on the Outputs

LauraCas72_0-1679079703353.pngLauraCas72_1-1679079733191.png

 

Roaduser
Regular Visitor

Instead of create file.

How do I use the export email, to then ad attachment? I want the email exported/saved into the list item as an attachment.

Is this possible rather than a link to a file in the doc library, which  I can do with the example above.?

The Export mail-action leads to a timeout everytime I start the flow.

Instead I tried to directly use 

triggerOutputs()?['body']
but this generates just an empty email....
Steve_luck22
New Member

Has anyone else every faced problems with certain parts of the automation skipping? i have tested the flow from my own email address and it works fine, but when i receive an email from the person i want to automate it skips the final process? anyone else ever faced this issue? is there a solution for it?

For those experiencing this issue finding this post - I have discovered *a solution* to the issue  It may not be your solution - but it was mine for the blank email error.


Make sure in your Flow creation that you in your Create a File component, the File Content you have selected (eg:  Body) is the one from the relevant Export component eg:

theseannn_0-1715236379357.png

 

 

I noticed that when the "blank" emails are downloading, they're all varying sizes (8kb/15kb/etc) - so I figured they must be downloading some level of content and realised they're not actually blank - they're generating as Word Documents, so if you're using Create a File to make them .eml/.msg then that's why they're blank.

 

So basically if you're using the Body output from the initial Trigger, then it will generate the email as a Word Document and that's where the confusion is setting in.

Hope this helps someone out there - because I've spent an embarrassingly long amount of time trying to find the solution.  There's nothing worse than googling a problem to find someone discovered it 10 years ago, made an updated to say they found a solution, but never gave an answer.

Helpful resources

Announcements

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (4,369)