cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Toasteroven
Level: Powered On

Saving an email after sending it

Hi there,

 

I have a flow where a user uses a PowerApps application and then presses a button. This then activates the flow and sends an email to the user with a list of their answers. This part works perfectly.

 

I also want to be able to save the contents of the email to a PDF on Onedrive. I am aware how to do this using a message ID for an incoming message. I have been referring to this thread:

 

https://powerusers.microsoft.com/t5/Building-Flows/save-email-as-pdf/td-p/109005

 

However, when sending a message, no 'Message Id' is created, meaning I can not save the contents using the same method. (See below)

 

Is there a way to either generate a message Id upon the action send an email, or is there some other way to export the contents of the email directly to a PDF without the need for a message Id?

 

Thanks

 

 

1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Saving an email after sending it

Hi @Toasteroven,

 

I'm afraid if we want to save the email completely. Export email action is the most effective method at the moment, but it requires a certain Message Id.

The content output by Send an email has almost nothing to exploit.

The advice I can give is to use Get emails (V2) to get the Message Id, but the Id obtained may be not necessarily the id of the message sent by send an message.

Because this method is going to "Send Items" folder to get the latest email, but not necessarily during the execution of the Flow period, there may be other emails sent.

    1. Anyway, you could try to configure To, From field to match the information of all the emails you find, which is the same as the configuration in the send an message action.

    2.Folder selects "Send Items", the maximum number is 1.

    3.Add Delay action (5s-10s), wait for the mail to be sent, and have been saved in "Send Items".

 

This may give you the desired email, but it may not be accurate.

You could then configure the resulting Message Id in Export email.

Image reference:

28.PNG

Take a try.

 

Best Regards,

Barry

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

Re: Saving an email after sending it

Hi @Toasteroven,

 

I'm afraid if we want to save the email completely. Export email action is the most effective method at the moment, but it requires a certain Message Id.

The content output by Send an email has almost nothing to exploit.

The advice I can give is to use Get emails (V2) to get the Message Id, but the Id obtained may be not necessarily the id of the message sent by send an message.

Because this method is going to "Send Items" folder to get the latest email, but not necessarily during the execution of the Flow period, there may be other emails sent.

    1. Anyway, you could try to configure To, From field to match the information of all the emails you find, which is the same as the configuration in the send an message action.

    2.Folder selects "Send Items", the maximum number is 1.

    3.Add Delay action (5s-10s), wait for the mail to be sent, and have been saved in "Send Items".

 

This may give you the desired email, but it may not be accurate.

You could then configure the resulting Message Id in Export email.

Image reference:

28.PNG

Take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Toasteroven
Level: Powered On

Re: Saving an email after sending it

Hi barry,

 

Your solution works perfectly!

Really appreciate the time you took to help. Thankyou!

 

Cheers

Toasteroven
Level: Powered On

Re: Saving an email after sending it

One slight issue sorry.

 

Once the file has been created, the date it says the email was sent on is very wrong. It seems to think the email was sent 25 hours before it actually was (see picture). I am assuming this is a tie zone error. I am in New Zealand.

 

pic.png

 

Cheers

Community Support Team
Community Support Team

Re: Saving an email after sending it

Hi @Toasteroven,

 

Do you mean that the time of Sent on recorded in the exported pdf file is inconsistent with the actual email delivery time?

I did the test on my side and there is no such problem as you.

The message that will be exported is not the one sent by the send an email action, as I mentioned that this method is not particularly precise and may export messages that are not expected.

Please try a few more times.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Toasteroven
Level: Powered On

Re: Saving an email after sending it

Hi Barry, It is still happening.

 

As you can see from the image below, I started the flow at 8.47 AM. The first email arrived at 8.47 AM and the second email with the PDF arrived at 8.48 AM. The PDF in the second email is based on the contents of the first email.

 

This PDF lists the time of the first email as 7.47 PM the previous day.

 

It is always 25 hours behind my time zone for some reason.

 

Any ideas?

 

Cheers

 

 

2.png

Toasteroven
Level: Powered On

Re: Saving an email after sending it

Just to clarify, yes the time of sent on the recorded PDF is wrong. The content is all correct. It is not calling the wrong email.

 

It is getting the information from the correct email, there is just a 25 hour disparity in the sent time.

 

Cheers

Toasteroven
Level: Powered On

Re: Saving an email after sending it

Issue still persists despite my best tries at a fix. Bumping

Toasteroven
Level: Powered On

Re: Saving an email after sending it

Can you please respond? still having the issue.

 

Thanks

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 440 members 5,234 guests
Please welcome our newest community members: