
UPDATE SUMMER ’23: This is no longer necessary! Read here.
When sending email from a contact record, it magically logs the message to your activity log. In classic, emails were/are automatically logged to the Activities related list. Well, flow doesn’t do that for you. Let me show you how to log it so you and your colleagues know when an email was sent to a contact.
After you add a “Send Email” action to your flow, add two more Create Records elements to the canvas. You will create records of these objects:
- Email Message (this creates the email message record)
- Email Message Relation (this junction object connects the email message to the contact).
Record Triggered Flow Scenario
See the images and video below for how to add your objects and map your fields.
I use text templates for the email body and the subject. This allows me to use merge fields and easily re-use the body and subject in multiple elements.
My example flow above is a record-triggered flow that fires when a contact is created. Because of this, I use $Record > Contact ID to access the id of the contact and $Record > Email to access their email. $Record is the global variable that stores all the information about the record that fired the trigger.
Screen Flow/Create Records Scenario
Let’s look at another scenario.

- Screen to collect contact info including email.
- Create Records to create Contact based on info in the screen.
- Send email action.
- Create Email Message.
- Create Email Message Relation

The create email message element will be exactly the same. The create Email Message Relation element will be slightly modified to access the right values. The Relation Email Address will be populated by the email address entered on the screen. You’ll find that under Screen Component. Click “Email” and select “Value.”
The RelationId will be set to the ID of the contact created in the previous step.
Both of these scenarios should work with lead records as well!
This is an amazing solution! I am sure I will reference it/use it in the future!
Thanks so much, Sam!
Hi,
I follow the same thing but I am unable to see the emailbody as rich text in activity. Please suggest me something.
Wow, I just started looking for solutions for this very dilemma, and low and behold! Thank you for sharing!
Excellent timing!
Love this thanks – would the create email message record work with an email alert or would you need to create mimicking variables ?
I don’t know how it works with email alerts but please let us all know if you try it!!
Sounds great! Let me know how it goes!
Jessie,
Thank you so much for posting this! It is hugely helpful and I was able to use this in a new flow in my environment.
How can I make this work for an existing flow that uses Email Alerts and Lightning templates?
Thanks!
It can work. You’d just need to copy the email template to a text template to store the content
I will definitely find a use case for this! Thank you for sharing such an awesome solution!
So clear and helpful! Thanks, Jessie!
Wonderful!
Hi Jessie, I wish I would have found this page before building the same flow for a client. I am still trying to solve a problem though if you can help. I am looking for a way to track the emails sent using this flow. So far research says it’s not possible, but let me know your thoughts.
Thanks in advance.
Tell me what you mean by “track.” Do you want to report on them?
By track I mean status if it is delivered, opened, unopened etc. Manually sending the email from Activity automatically tracks the email but through flows it doesn’t. I see there’s an idea on salesforce for this, but I am trying to see if there’s a workaround or a hack for this.
Hi Jessie, it’s me, Sandy! I love this post, but I have an outstanding question just like Sanket. I have email tracking enabled in my org, so it shows if an email was opened by the recipient. Your solution above works, but in my testing, when the email is opened, it does not show as opened in Salesforce. Any thoughts? Thanks
Hey Sandy! I don’t know how to get this to work. I’m sorry!
Hi guys, I am also interested in a solution to tracking the opened, unopened status of an email sent from a flow.
Thanks a lot for this wonderful solution, Jessie. It worked like a charm! This is exactly what I was looking for. Thanks once again.
Hi JessieRymph I’m trying this on account record to send emails all related contacts. My problem is your solution is working for single contact . If I select multiple records it’s throwing error. Can you please suggest me. Thank you .
You would most likely need to use a loop. I am not exactly sure how but that’s my initial thought
When I try to create an Email Message I get an error the ParentID is required. Even populating that ID with a Case (the only option), it does not relate my new message to my Lead. Any thoughts?
So sorry that I didn’t get back to you. If you still have the problem, can you send me a screen shot of what’s going on? jrymph@salesforce.com
I had the same issue – I turned on Enhanced Email in Setup and that solved my issue.
If anyone encounters the same problem – I did everything right (or so I thought) but the message was still not appearing in the Contact activities. Turns out I forgot to set a Status to ‘Sent’ in the Email Message object. It was saving in Draft so it wasn’t appearing on the Contact. 🙂
Hi, is it possible to user create record under EmailMessage object and pass body, subject and other fields when I am using Email alert under flow ? because I have to create too many Email template? The only way to create record under emailmesssage object and pass body subject is only through text template ? can anyone please confirm