Skip to content

Notification Email

Whenever a mentor or student recieves a new message, they get an email alert. This is done using two parts - a flow and a lightning email template.


Mentoring - New Message Notification

The flow Mentoring - New Message Notification is laid out in the following method.

graph TD N2[Record Triggered Flow] --> N3[Get Recipient Email] N3 --> N4[Decide: Mentor or Student] N4 -->|Mentor Wrote| N5[Send Email to Student] N4 -->|Student Wrote| N6[Send Email to Mentor] N5 --> N7[End Flow] N6 --> N8[End Flow] N2 -->|Error| N9[If An Error Happens] class N2 click-step-N2; class N3 click-step-N3; class N4 click-step-N4; class N5 click-step-N5; class N6 click-step-N6; class N9 click-step-N9; classDef clickable stroke:#333,stroke-width:2px; class N2,N3,N4,N5,N6,N9 clickable;

Lightning Email Template

There are two lightning email templates used for new message notifications, both created with the website BeeFree.io and then copy and pasted into the lightning email editor after some minor changes. Both email templates are set up to relate to a Message__c record, meaning we can pull merge fields from the message record. This is done with three sets of curly brackets on each side - {{{Like This}}}

You can view all of the Mentoring Email Templates inside this folder.

Before being merged, the email templates look plain and broken - however, the merge fields will be filled with data later during the flow. We have three merge fields. They may look confusing or duplicate at first, but it makes sense when broken down: Record.Field. The first part is telling the email template what record to look in (the recipient or the message) and the second part is telling it what field to pull data from. So, Message__c.Message__c is saying look inside the Message record and pull the Message field. Remember, the __c just means that it is a custom object, and not something that Salesforce built into their system by default.

  • {{{Recipient.Familiar_Name__c}}}
  • {{{Message__c.Mentor_Portal_Link__c}}}
  • {{{Message__c.Message__c}}}

All images in the mentoring email templates must be static direct URL type images that are publicly available to be loaded in most email clients (Outlook, Gmail, Yahoo). This means that you cannot use an image in SharePoint or Google Drive (many of our partners have these domains blocked). Best practices for our organization currently is to upload the image as an asset to WordPress and then use the wordpress image URL in the email template - usually in the format of bestprep.org/wp-content/uploads/YYYY/MM/filename.jpg.

Mentoring Email Template

You can view the notification emails below, or read about the weekly emails here.