Following article provides step by step instructions on How to Send Drip Emails/Campaign to Leads in Salesforce through the Workflow process defined by Process Builder. (Please note that you can setup drip emails/campaign in Salesforce for other objects supported by MassMailer as per your requirement)


Email status values such as open, click, bounce, spam, unsubscribe etc gets logged under a custom object called 'MassMailer Email Status' related to the Lead object. Activity history also gets logged under the Lead object.


Important Note:

  • This article is only an example on how to send Drip Emails or setup Drip Campaign to leads in Salesforce. You can create the drip emails/campaign in salesforce for the other objects as well such as: contacts, accounts, contacts, users, and cases.
  • MassMailer Drip email alerts feature supports Leads/Contacts/Accounts/Users/Cases/Opportunity objects (The process builder will not show any error if any other records are used upon saving but will not work).
  • Salesforce Process Builder is so powerful that you can perform many advanced actions such as creating tasks, updating records, notifying users while creating drip emails/campaigns in Salesforce.



1. Navigate to the Workflow Process builder in Salesforce:


Click on the Salesforce 'Setup' from top right corner and search for process builder from the quick find box in the left side panel.




Click on the Process Builder link from the search results from the above step and click on the 'New' button. This will open a form to enter the workflow process details.



2. Create a new Workflow Process:


Enter the 'Process Name', 'Description', 'The process starts when' values as per your needs and click on the 'Save' button.




3. Choose Object and Specify when to start the Workflow Process:


Select the respective Process from the summary page by clicking on the Process Name link.



Click on Add Object to choose the Lead Object from the list shown. 


Under 'Start the process' section, select either 'only when a record is created' or 'when a record is created or edited' option based on your requirement and click on 'Save' button.




4. Define Criteria when to trigger the Workflow Process:


Click on 'Add Criteria' and enter 'Criteria Name', select 'Criteria for Existing Actions', fill the 'Set Conditions' section and then add the conditions logic as per the example show in the following picture. Once all the information is entered click 'Save' to save the criteria.




5. Define Immediate Action to trigger Drip 1 Email Alert:


Click on 'Add Action' and do the following and click 'Save'.

  • Select the Action Type as 'Apex'

  • Enter Action Name

  • Choose ‘MassMailer - Email Alert’ as the APEX class

  • Set the Apex Variables (* means Required )

    • Template Id * : This could be the Salesforce Email Template Id or a field that contains the email template Id that you wish to use.

    • Record Id Field * : Id Field of the Lead record. An activity history will be created under this record when the email is sent successfully.

    • To Address : The recipient’s email address, must be a valid email address (MassMailer’s field mappings are used if this is not specified, to check those go to the ‘MassMailer Setup’ tab and check field information).
    • To Name: The recipient’s name (the record’s standard ‘Name’ field is used if this is not specified).
    • CC Address : The CC recipient’s email address, must be a valid email address or a field reference that contains the email address.
    • BCC Address : The BCC recipient’s email address, must be a valid email address or a field reference or a field reference that contains the email address.
    • From Address : Sender’s email address, must be a valid email address (logged in user's email is used if this is not specified).
    • From Name : Sender’s name (logged in user's name is used if this is not specified).




Once we are done with defining the immediate action for Drip 1, we will click on 'View All Processes' button and move to Step 6 to define the the process related to Drip 2 & Drip 3. We will come back to Drip 1 process to schedule the respective actions to invoke the newly defined Drip 2 & 3.




6. Define the Process related to Drip 2:


Click on the 'New' button to define the new process for example given below.





Enter 'Process Name' 

Tab out to auto populate 'API Name'

Enter 'Description'

Make sure you select 'It's invoked by another process' value from the dropdown list for the field, 'The process starts when' (This is a must option if you are looking to implement a drip campaign)



Click on the process we just created, 'New Lead Drip 2'.



Click on 'Add Object' and select 'Lead' and click Save button.




Now you can add any filter criteria by clicking on 'Add Criteria' link and add any filter conditions.


The criteria you plan to add can also be an exit criteria that there won't be any drip email sent to the lead. The following example shows the exit criteria as if the Lead is 'Closed - Converted' or 'Closed - Not Converted' then don't take any action further. So this becomes your exit criteria for any lead to come out of the Drip. Once the criteria is entered, click on Save button.




 You also have an option NOT to add any criteria by selecting 'No criteria - just execute the actions!' option and save.




Now click on 'Add Action' to add the action to send the email alert for Drip 2. Enter the following values for Template Id (you can choose any Salesforce email template id that is meant for Drip 2), Record Id Field (in this case it is Lead Id), From Address, From Name, To Address, To Name, CC, BCC and click on Save to record the changes.



Click on 'Activate' button to activate the process that we just defined.





7. Define the Process related to Drip 3 (required only if you have more than 2 drips):


Click on the 'New' button to define the new process for example given below.





Enter 'Process Name' 

Tab out to auto populate 'API Name'

Enter 'Description'

Make sure you select 'It's invoked by another process' value from the dropdown list for the field, 'The process starts when' (This is a must option if you are looking to implement a drip campaign)



Click on Save to save the process.



Click on the process we just created, 'New Lead Drip 3'.




Click on 'Add Object' and select 'Lead' and click Save button.




Now you can add any filter criteria by clicking on 'Add Criteria' link and add any filter conditions.


The criteria you plan to add can also be an exit criteria that there won't be any drip email sent to the lead. The following example shows the exit criteria as if the Lead is 'Closed - Converted' or 'Closed - Not Converted' then don't take any action further. So this becomes your exit criteria for any lead to come out of the Drip. Once the criteria is entered, click on Save button.



 You also have an option NOT to add any criteria by selecting 'No criteria - just execute the actions!' option and save.



Now click on 'Add Action' to add the action to send the email alert for Drip 3. Enter the following values for Template Id (you can choose any Salesforce email template id that is meant for Drip 3), Record Id Field (in this case it is Lead Id), From Address, From Name, To Address, To Name, CC, BCC and click on Save to save the changes.



After saving the process would like something below. Click on Activate button to activate 




Now you can stop Drip 3 if you don't have any further drips that you want to define and get back on invoking Drip 2 and Drip 3. If you have more drips to add, you can continue the steps by defining Drip 4, Drip 5, Drip 6 etc.



8. Invoke Drip 2 from Drip 1:


Go to 'View All Processes' summary page and click on the process related to Drip 1 in this example, 'New Lead Drip 1'




Click on 'Set Schedule' link and enter the schedule for example, 1 Day after Lead Created Date as shown below. Set Time for Actions to Execute depends on your business need. Click Save button to record the changes.




Now click on 'Add Action' link for the scheduled action we are defining to invoke Drip 2. 


- Select 'Action Type' as 'Processes'.

- Enter 'Action Name'.

- Select the respective process to invoke.

- Now we need to set the process variable so we let the system know that it needs to trigger the invokable process on the same Lead object in the context.

- Process Variable Type should be 'Field Reference'. Click on 'Find a field' under 'Value' column.



It pops a window with options. Select the option, 'Select the Lead record that started your process' and click on 'Choose' button.



Now click on 'Save' button to record the changes.



It looks like the following once the changes are saved.






9. Invoke Drip 3 from Drip 1:



Now that you are done invoking Drip 2 from Drip 1 let us repeat the same to invoke Drip 3.


Click on 'Set Schedule' and enter the schedule for example, 2 Days after Lead Created Date as shown below. Set Time for Actions to Execute depends on your business need. Click Save button to record the changes.





Now click on 'Add Action' link for the scheduled action we are defining to invoke Drip 3. 



- Select 'Action Type' as 'Processes'.

- Enter 'Action Name'.

- Select the respective process to invoke.

- Now we need to set the process variable so we let the system know that it needs to trigger the invokable process on the same Lead object in the context.

- Process Variable Type should be 'Field Reference'. Click on 'Find a field' under 'Value' column.



It pops a window with options. Select the option, 'Select the Lead record that started your process' and click on 'Choose' button.




Now click on 'Save' button to record the changes.



It looks like the following once the changes are saved. Now click on 'Activate' button to activate the process.




10. Track Email Status on the Lead Object for Drip Emails/Campaign in Salesforce:


Email status values such as delivered, open, click, spam, unsubscribe, bounce etc gets captured on the Lead in a related list object called 'MassMailer Email Status'.




11. Track Activity History on the Lead Object for Drip Emails/Campaign in Salesforce:


Activity history gets captured on the Lead object.