Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Automatically Send Greeting Email on Birthdays using Microsoft Flow

$
0
0

Recently we received a business requirement where client wants to send Birthday Emails to the CRM contacts. We tried this using Microsoft Flow. In this blog we will discuss this.

First we need to create a Recurrence trigger so that this functionality will run every day.

To create recurrence trigger in Flow please follow below steps:

1. Click on “Create from Blank” button as shown in below screenshot.

Automatically Send Greeting Email on Birthdays using Microsoft Flow

2. After clicking on “Create from Blank” below window will appear and then search for the Recurrence trigger once clicked on “Search hundreds of connectors and triggers”

Automatically Send Greeting Email on Birthdays using Microsoft Flow

3. Click on below trigger shown in the screenshot

Automatically Send Greeting Email on Birthdays using Microsoft Flow

4. Set Interval as ‘1’ and Frequency as ‘Day’ as shown below.

Automatically Send Greeting Email on Birthdays using Microsoft Flow

This is how the recurrence trigger will get created.

When the recurrence trigger gets created then you need to create Action to list all the Contact entity record from your CRM, you can follow below steps to create action.

1. Click on ‘New Step’ button and then ‘Add an action’ button as shown below

Automatically Send Greeting Email on Birthdays using Microsoft Flow

2. Then select Dynamics 365 and List records as shown below

Automatically Send Greeting Email on Birthdays using Microsoft Flow

3. Select the ‘Organization name’ from option set, Entity Name should be ‘Contact’ and Filter Query to filter the records from CRM (i.e. get the list of Active records only)

Automatically Send Greeting Email on Birthdays using Microsoft Flow

When the listing of all contacts from CRM is completed then we need to click on ‘Add an apply to each’ option, so that we can run the flow on every record. Follow below step to add and apply to each option in Microsoft flow.

Automatically Send Greeting Email on Birthdays using Microsoft Flow

Automatically Send Greeting Email on Birthdays using Microsoft Flow

After the above step add a condition to compare ‘Birthday’ date to ‘Todays’ date as shown below.

Automatically Send Greeting Email on Birthdays using Microsoft Flow

Automatically Send Greeting Email on Birthdays using Microsoft Flow

Use below fetch expressions in the condition attribute.

1. To get the Value from CRM Birthday field use below expression, this expression will format date time and convert date to MM/dd format.

formatDateTime(items(‘Apply_to_each_2′)?['Birthdate'], ‘MM/dd’)

2. Use “is equal to” operator for comparing the Date fields.

3. Then use today’s date to compare the CRM Birthday field Date

formatDateTime(utcNow(), ‘MM/dd’)

If the above condition matches then you can Send Email to the Contact for which the condition is successful, otherwise it will ignore the process.

To send the email ‘To’ field is mandatory by using the below expression you will get the value of the field.

items(‘Apply_to_each_2′)?['emailaddress1']

You can provide Subject and Body of the email as per your specifications.

Yes condition will look like below screenshot

Automatically Send Greeting Email on Birthdays using Microsoft Flow

Conclusion:

Using the steps above the user can automatically send email greetings on birthdays using Microsoft Flow.

 


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>