In this blogpost, we will try to achieve the recurrence trigger of Microsoft Flow with Dynamics 365 Data. We will send a Birthday greeting to all the contacts from Dynamics 365 using Microsoft flow.
Steps to Configure Microsoft Flow Recurrence trigger with Records in Dynamics 365 to Send Birthday Email.
Step 1: Login to Microsoft flow and you will see the screen below after login.
Step 2: After login, go to “My Flows”. It will show the screen below. Select “Create from blank”.
Step 3: Now you should select “Search hundreds of connections and triggers” as shown in the image below:
Step 4: Now you need to select the trigger that you need. In our case, we will select “Schedule - Recurrence” as shown in the image below.
Step 5: Now you must select the Recurrence pattern. In our case, we will select “Day” as Frequency and “1” as Interval shown in the image below:
Step 6: Now we will add “New Step” and then “Add an action” as shown in the image below:
Step 7: Now we need to select the connector for the provided ones. So, in our case we will search for “Dynamics” and then we select “Dynamics 365 – List records” as shown in the image below:
Step 8: Now you need to select the organization that we want to utilize and then the Entity that we want to consume. In our case, we will select “Contact” as shown in the image below:
Step 9: Now we will add the step and click on “More” and then click on “Add on apply to each” as shown in the image below:
Step 10: After that, we basically place the loop to iterate each record and select the “value” of each iteration too as shown in the image below:
Step 11: Now we will add a condition to verify the Birthday of the record. We are using advance mode to give the condition.
“@equals(formatDateTime(items('Apply_to_each')?['birthdate'],'MM/dd'), formatDateTime(utcNow(), 'MM/dd'))”.
Step 12: Now we will add an action to perform if condition is true as shown in the image below:
Step 13: Now we will add an action and perform search to find the email provider. In our case, we are using “Gmail – Send email” as shown in image.
Step 14: Now we provide the “To” which we select from the record that we are iterating which is “Email” and then utilizing the “Full Name” as shown in the image below:
Step 15: Now we need to Save the flow by clicking on any “Save” button as shown in the image.
Step 16: After saving you will see the screen below and we are ready to Run the flow.
Step 17: We can also check the history of Flow when it has run and how long it has taken.
Hope this will be helpful.
We can make a Recurrence process using Microsoft Flow with Dynamics 365 data to perform recursive operations. In our case, we are sending greeting emails.
If you have any question or queries, do not hesitate to reach out to us!