How to Send Birthday Emails from Excel using Power Automate?

At times, the Employee information like Employee ID, Employee Name, DOB, and Email address will be stored in an Excel workbook. So, based on the Excel workbook DOB column, we need to send birthday wishes to Employees using Power Automate scheduled cloud flow. Now, how to send birthday emails from Excel using Power Automate.

Scenario:

Recently, I got a requirement where I have to send birthday wishes to employees. So here I have created a Scheduled cloud flow using Power Automate that runs every day at 10:00 AM, checks the employee whose birthday falls today, and sends them a birthday wish from Excel using flow.

Initially, create an Excel table (Insert -> Table) and add the columns with values as displayed below. Upload the Excel workbook to the SharePoint Online document library.

Column NameData Type
EmployeeIDGeneral
EmployeeNameGeneral
DOBDate
Email IDGeneral

My Excel Workbook looks like below:

send birthday email from excel using flow

Now, we will create a scheduled cloud flow that will trigger every day automatically.

How to Send Birthday Emails from Excel using Power Automate

Let us see how to Send Birthday Emails from Excel DOB column using Power Automate flow,

Follow the below steps to send birthday emails from Excel based on the DOB column presented using Flow.

Step-1:

  • Using the Microsoft Credentials, login to Power Automate, and select +Create -> Scheduled cloud flow.
  • Enter the flow name, choose the Starting Date, Time, and Repeat frequency, and click the create option. I want to run the flow daily, so I have selected every 1 day.
How to send birthday email from excel using flow

Step-2:

  • Add a new step and select List rows present in a table action from action triggers; provide the below-required parameters.
  1. Location – Select the Location where the Excel file exists
  2. Document Library – Choose the document library from the dropdown
  3. File – Select the Excel file ( I have selected my Employees Birthday Table)
  4. Table – From the dropdown, select the table name
How to send birthday email from excel using Power Automate

Step-3:

  • Select a new step and add two initialize variable actions; for the DOB and Email ID, select the variable type as String, and leave the value section blank.
Example to send birthday email from excel using flow

Step-4:

  • Add an apply to each control loop and pass the input as dynamic content values.
Example to send birthday email from excel using Power Automate flow

This will get all the rows from the Excel table.

  • Inside the loop, add a set variable action and in the name section from the dropdown, select the initialized variable (DOB). In the value section, pass the dynamic content of the DOB value.
Send birthday email from excel using the flow
  • Similarly, add another set variable action from the dropdown’s name section and select the initialized variable (Email ID). In the value section, pass the dynamic content of the Email ID value.
Send birthday email from excel using Power Automate flow

Add a compose data operation and add the below expression to format only the date and month from the DOB column in the Excel workbook.

formatDateTime(variables('DOB'),'MM-dd')
Send Birthday Emails from Excel using Microsoft flow
  • Add a condition control inside Apply to each block. Select the select the output of compose action “is equal to today’s date. Pass the below-mentioned expressions:
formatDateTime(utcNow(), 'MM-dd')
  • And then in the If yes, use a Send an email (V2) action like below and provide To, Subject, and Body from dynamic content values.

In the ‘If NO’ part, leave it blank:

This will check and filter the row values based on the DOB column and send a birthday wish Email to the Employees.

How to Send Birthday Emails from Excel using Microsoft flow

Step-5:

  • Save and Run the flow. The flow will trigger on the Scheduled time. Here, For testing purposes, I have triggered the flow manually. Once the flow runs successfully, like below:
How to Send Birthday Emails from Excel using Power Automate flow
  • The employees will receive birthday emails as per the birth date presented in the Excel workbook in Outlook like below:
Send birthday email from excel using the flow example

This is how to Send Birthday Emails from the Excel DOB column using Power Automate flow.

Conclusion

In this Power Automate tutorial, we will see how to send birthday wishes to Employees from an Excel using Power Automate flow.

You may also like: