cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Community Support
Community Support

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.

View solution in original post

8 REPLIES 8
Highlighted
Community Support
Community Support

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.

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Saving an email after sending it

Hi barry,

 

Your solution works perfectly!

Really appreciate the time you took to help. Thankyou!

 

Cheers

Highlighted
Advocate II
Advocate II

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

Highlighted
Community Support
Community Support

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.
Highlighted
Advocate II
Advocate II

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

Highlighted
Advocate II
Advocate II

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

Highlighted
Advocate II
Advocate II

Re: Saving an email after sending it

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

Highlighted
Advocate II
Advocate II

Re: Saving an email after sending it

Can you please respond? still having the issue.

 

Thanks

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (8,743)