function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Janno RipJanno Rip 

Struggling with created EmailMessages from Flow - isTracked & FromId not properly working

I have created a Flow that sends an email using emailalert and afterwards creates an 'emailMessage' record in order to show that email in the activity timeline. This is working so far. But there are 2 things which are not.
  1. 'isTracked' is set to true but the email in the activity timeline stays always at "unopened" - is there something else I have to define? It is working when emails are sent and created the "regular/non-flow" way
  2. 'FromId' is where I would argue needs to be set the id of the user. Unfortunately it throws an error:
Error Occurred: Error occurred attempting to get data type for : RawFieldImpl[tableName: EmailMessage, columnName: FromId]

The result is that in the activity timeline it does not say "You sent the mail", but "jan.tonnet@..." sent the mail.

User-added image

User-added image

User-added image
AbhishekAbhishek (Salesforce Developers) 
Hi Janno,

Try the suggestions as mentioned in the below blogs,

It might help you.

Nicholas SullivanNicholas Sullivan
I am having the literal exact same issue. The tracking thing I think is potentially just impossible without sending it manually, but I don't understand why the to shows up as an email instead of the user.