Send an Email Alert when a new record is created by e2a


Setup an Email Alert whenever a new record is created by e2a

Whenever an e2a email is received and it creates a new record (Standard or Custom Object) as per the e2a Email Rule criteria, it is often useful to send an email notification when it is created. This notification email could be sent to the record owner, any specific user or an external email address. If you want to setup such an alert system so that an email alert is sent whenever a new record is created by e2a, then please proceed as follows. The steps below explain the procedure for setting email alerts on 'Lead', but could be used for any other Object (Standard i.e. Case / Custom), by just replacing 'Lead' with that object.

 

Field Configuration

First, we need to create a new custom field in 'Lead', which will be used to indicate the Lead record creation by e2a

  1. Go to Setup | Lead | Fields
  2. Select New in section Lead Custom Fields & Relationships
  3. Select Checkbox and click Next
  4. Provide Field Label (Created by e2a) and select Unchecked for the Default Value
  5. Provide Description and click Next (Example Description: 'The field is set to checked when a Lead record is created by e2a')
  6. Select appropriate profiles in Establish field-level security and click Next
  7. Select appropriate page layouts in Add to page layouts and click Next (There is no requirement for this field to be visible on any layout and can thus be kept hidden)

 

Field Assignment Rule Configuration

Secondly, we need to configure a Field Assignment Rule in the related 'e2a Email Rule' to populate the created checkbox (New e2a Email) on arrival of an e2a email. 

  1. Go to e2a Email Rules and select your email rule linked to Target Object Lead. Click on the e2a email rule
  2. Click on the New button in the Field Assignment Rule section 
    1. Select Create Record from the Trigger On  drop-down
    2. Select 'Always' from the Trigger Type  drop-down
    3. Enter a number ( greater than 0) in the Processing Order field
    4. Select 'Fixed Value Assignment' from the Assignment Type drop-down
    5. Select 'Created by e2a' (checkbox created earlier) from the Select Field drop-down
    6. Mark the checkbox as checked in the Field Value field ( To populate the field Created by e2a whenever a new e2a email is received and created a Lead) 
    7. Click on Save

 

Email Alert Configuration

Thirdly, we need to create an Email Alert that will be sent out to the record owner/email address whenever a new record is created. 

 

  1. Go to Setup | Create | Workflow & Approvals| Email Alerts and click New Email Alert
  2. Add Description, select Lead for the Object drop-down, and select Email Template (This template will be used for Email Alerts)
  3. Select User from Search in Recipient Type (To whom Email Alerts will be sent)
  4. Select User in Available Recipients and click on Add button to move it to Selected Recipients
    • You can enter up to five email addresses in Additional Emails to be notified
    • You can choose default From Email Address from the drop-down list. Click on Save button

Now, to send an Email alert, we need to setup a Flow in Salesforce

 

Flow Setup

To get started with setting up the Salesforce Flow needed, follow the instructions below: 

 

  1. Click on the gear icon on the top-right of your screen and select Setup

  2. Locate the quick find on the left side of your screen and type in Flows and Click on the first returned result under Process Automation.

  3. Locate and click on the New Flow button on the right of your screen

  4. Choose the Record-Triggered Flow type from the available options and click on the Create button. This will automatically load the Configure Start pop-up.

    1. In the Object lookup, select Lead

    2. Under the Configure Trigger section, for Trigger the Flow when: select A record is created 

    3. Under the Set Entry Conditions section, for the Condition Requirements drop-down, choose All Conditions are Met (AND) 

      1. Click in the Field and select $Record > Created by e2a 

      2. From the Operator drop-down select Equals 

      3. In the Value field, enter True and select {!$GlobalConstant.True}

    4. For the Optimize the Flow for: options, select Actions and Related Records 

    5. Click on Done 

  5. Click on the plus sign after the Start element 

  6. Search for the Send Email Alert element and choose it to use

    1. In the New Action pop-up, search for the earlier created email alert in the Action lookup and select it

    2. Enter a suitable Label and Description for the element

    3. Under the Set Input Values for the Selected Action section, click in the Record ID field and choose $Record > Record Id

    4. Click on Done

  7. Save and Activate the Flow

 

Congratulations! You have successfully set up an email alert whenever a new Lead record is created by e2a. 

 

Please contact us at support@ortooapps.com for any questions.

Was this information helpful?
Quick survey: How do you rate Email-to-anything?
★★★★★ - EXCELLENT
★★★★ - GOOD
★★★☆☆OK
★★☆☆☆POOR
☆☆☆☆ - RUBBISH

-