Let us save an email as PDF document when using outlook.com or 365.
For example I would like to set up a flow that lets me archive all emails that come are put into a certain folder as PDFs to my OneDrive. From what I see this does not seem to be possible as of right now.
Solved! Go to Solution.
Is there a way to have either the PDF (or preferably) the .eml or .msg format of the outlook mail be printed/attached as a page in a section of OneNote? Storage on the OneDrive folder is good, but even better would for my workflow would be to have each e-mail be printed/pasted into its own page within a section of a OneNote notebook.
I agree there should be standard action from Microsoft. Find my response to your questions below:
Again I am not advocating the ConvertAPI, I've just found the free plan thought of consuming it on Flow. You can also host the API in Azure for converting email to PDF with some C# code, there are opensource PDF libraries (PDFSharp, iTextSharp etc) available.
I am trying to convert the time stamped on the converted email section "Sent On" . I was able to convert from UTC to my time zone (using the convert time zone connector after the "When a new email arrives" trigger) which i used for the PDF name but i'm curious if there is a way to convert and paste the updated time on the actual PDF. Any thoughts?
For example.. here is the time stamp listed on the converted email. It states it came in at 2:16 pm UTC but i need it to be listed as 8:16 am MT.
Thank you !
Hi @v-xida-msft ,
quick question, our company has an email retention policy of one (1) year, My question: is possible to add a date range or select time period to save all the email under the selected timeframe?
I would like for instance have saved all my emails from July. Or even better at the end of July 31st @ 11:59 pm will trigger my flow and start backing up my email from July 1st until July 31st and automatically saving all PDF's in my one drive?
Thank you kindly for any response
There might be a work around without resorting to external APIs. I tried converting to HTML instead of PDF to see if embedded images would come up correctly. My flow also saves all attachments, and treated those embedded images as attachments and saved them, which was unexpected but helpful. Looking at the HTML the part where the embedded images are has what looks like a temporary path created during the conversion process. Mine looked like src="C:\SandboxTempLow\as987df6asd876f87asd678f6as89\email_content\image001.png". When I removed the path from the src bit and just had src="image001.png" the HTML file showed the embedded image correctly when open in a web browser.
Perhaps the flow can edit the HTML file and replace the offending src string with the right one and hey presto HTML files show embedded images? Will see how it goes, hope this helps anyone else scratching their heads.
@camerond01Sounds great that you have a possible solution! I quit by trying it for a time by myself. 😞
It would be perfect if you could share your full flow when it works with different emails. Here is also a topic where your solution would be extremely interesting for people: :
The flow starts about the same as the accepted solution, but with a parallel workflow to also save each attachment:
From there it gets messy:
I had to escape the backslashes in the HTML source, changing "C:\blah\blah\" to "C:\\blah\\blah\\". For each email attachment looks like this:
If something like this comes up again I'm going to stand up an API endpoint on my public facing server and just make calls to that and deal with everything at my end and send back results, because quite frankly this is a ridiculous solution to a stupid problem. I mean yeah it works, but at what cost.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!