Send Birthday Greeting Using Salesforce Flow

Author: Rishabh Dubey

Workflow rules or Process builder by themselves typically run once until a record is saved or edited in any way, in which case it is reset. So, creating a single workflow rule or process builder to email a customer on his or her next birthday is a fairly basic automation. The trick is to get it to reset every year. If you follow the below article provided by salesforce you will need to create 4 different workflow rules, Multiple custom fields and then only it will work on future records for existing contact records you need to use data management tools (Data Loader, Data Import wizard)

However there is an easy alternative to this using Salesforce Flow. And the same can be done by 1 Salesforce Flow and 2 custom fields.

In this article we will see step by step process of creating a Flow to send Birthday Greetings every year.

Step 1. Create two Formula fields (Text) that will return Birthday Month and Birthday Day.

  1. Go to object manager
  2. Go to Contact Object
  3. Go to Fields and relationship
  4. Click new
  5. Select data type Formula
  6. Select return type and text and name the field “Birthday Month”
  7. The Syntax will be =   “TEXT(MONTH( Birthdate ))”
  8. This field is not required on Page layout
  9. Follow the same steps for “Birthday Day” field and the Syntax will be =”TEXT(DAY( Birthdate ))”

Step 2. Create a  Scheduled-Triggred-Flow

  1. Go to setup 
  2. Go to Flows click on New flow from top right
  3. Select Scheduled-Triggered-Flow and then next
  4. Select free form layout
  5. Click on set schedule
  6. Select start date as Today and Start time as 8 AM. And frequency will be Daily
  1. Do not make any changes in Choose object section
  2. Drag get record element from right and drop on the Canvas
  3. Label = Get Contact Records
  4. Object Will be contact
  5. Condition Requirements = All Conditions are Met (AND)

Condition 1.

Birthday_Day__C  Equal = We need to create a new resource 

Resource Type = Formula

APIName = TodaysDay

Formula Syantx = TEXT(DAY(TODAY()))

Condition 2.

Birthday_Month__c Equal = We need to create a new resource 

Resource Type = Formula

APIName = TodaysMonth

Formula Syantx = TEXT(MONTH(TODAY()))

  1. Sort Contact Records Ascending and sort By = ID
  2. How to store record data = Choose fields and assign variables (advanced)
  3. Select Variable to Store Contact Records = Select new resource

Resource Type =Variable

API Name = Customercontactforemail

Data Type = record

Allow multiple values (collection) = Check

Object = Contact

  1. Add fields firstname,lastname,email birthdate
  1. Drad Loop element
  2. Label =”Loop Through Contacts”,Collection variable = “{!Customercontactforemail}”,Direction first item to last
  1. Go to manager tab from top left and click on new resource

Resource type = Text Template

APINAME= Birthdaywish

Body = 

Hi {!Loop_Through_Contacts.FirstName},

Wishing you a very happy birthday.


Rishabh Dubey,

S. Drag Action element to the canvas

Label = Send Email

Body = {!BirthdayWish}

Su ject = Happy birthday

Email Addresses (comma-separated)={!Loop_Through_Contacts.Email}

Rich-Text-Formatted Body = {!$GlobalConstant.True}

Sender Address=enter your email address

T. And Loop to action for Each Items and and action to loop Again

This is how the flow will look like

Save and Activate the flow.

This flow will run daily at 8 AM and will send the Birthday email to all the contacts who have birthdays on the same day.

We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.