{"id":12926,"date":"2018-09-19T17:19:53","date_gmt":"2018-09-19T11:49:53","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=12926"},"modified":"2022-09-02T16:39:27","modified_gmt":"2022-09-02T11:09:27","slug":"automatically-send-greeting-email-on-birthdays-using-microsoft-flow","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2018\/09\/automatically-send-greeting-email-on-birthdays-using-microsoft-flow\/","title":{"rendered":"Automatically Send Greeting Email on Birthdays using Microsoft Flow"},"content":{"rendered":"<p style=\"text-align: justify;\">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.<\/p>\n<p style=\"text-align: justify;\">First we need to create a Recurrence trigger so that this functionality will run every day.<\/p>\n<h2 style=\"text-align: justify;\">To create recurrence trigger in Flow please follow below steps:<\/h2>\n<p style=\"text-align: justify;\"><strong>1<\/strong>. Click on \u201cCreate from Blank\u201d button as shown in below screenshot.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12927\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/1Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"951\" height=\"241\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>2<\/strong>. After clicking on \u201cCreate from Blank\u201d below window will appear and then search for the Recurrence trigger once clicked on \u201cSearch hundreds of connectors and triggers\u201d<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12928\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/2Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"946\" height=\"582\" \/><\/p>\n<p><strong>3<\/strong>. Click on below trigger shown in the screenshot<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12929\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/3Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"971\" height=\"361\" \/><\/p>\n<p><strong>4<\/strong>. Set Interval as \u20181\u2019 and Frequency as \u2018Day\u2019 as shown below.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12930\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/4Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"971\" height=\"233\" \/><\/p>\n<p style=\"text-align: justify;\">This is how the recurrence trigger will get created.<\/p>\n<p style=\"text-align: justify;\">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.<\/p>\n<p style=\"text-align: justify;\"><strong>1<\/strong>. Click on \u2018New Step\u2019 button and then \u2018Add an action\u2019 button as shown below<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12931\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/6Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"948\" height=\"530\" \/><\/p>\n<p><strong>2<\/strong>. Then select Dynamics 365 and List records as shown below<\/p>\n<p><img decoding=\"async\" class=\"wp-image-12932 alignnone\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/7Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"950\" height=\"794\" \/><\/p>\n<p><strong>3<\/strong>. Select the \u2018Organization name\u2019 from option set, Entity Name should be \u2018Contact\u2019 and Filter Query to filter the records from CRM (i.e. get the list of Active records only)<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12933\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/8Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"950\" height=\"466\" \/><\/p>\n<p>When the listing of all contacts from CRM is completed then we need to click on \u2018Add an apply to each\u2019 option, so that we can run the flow on every record. Follow below step to add and apply to each option in Microsoft flow.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12934\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/9Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"950\" height=\"537\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12935\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/10Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"947\" height=\"548\" \/><\/p>\n<p>After the above step add a condition to compare \u2018Birthday\u2019 date to \u2018Todays\u2019 date as shown below.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12936\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/11Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"949\" height=\"739\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12937\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/12Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"951\" height=\"431\" \/><\/p>\n<p style=\"text-align: justify;\">Use below fetch expressions in the condition attribute.<\/p>\n<p style=\"text-align: justify;\"><strong>1<\/strong>. To get the Value from CRM Birthday field use below expression, this expression will format date time and convert date to MM\/dd format.<\/p>\n<p style=\"text-align: justify;\"><strong>formatDateTime(item<\/strong>s<strong>(<\/strong>&#8216;Apply_to_each_2&#8217;<strong>)<\/strong>?[&#8216;Birthdate&#8217;], &#8216;MM\/dd&#8217;<strong>)<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>2<\/strong>. To handle the Null Condition i.e. if the Birthdate field doesn\u2019t contain any values then you need to modify the above formula as shown below<\/p>\n<p><strong>if(equals(item<\/strong>s<strong>(<\/strong>&#8216;Apply_to_each_2&#8217;<strong>)<\/strong>?[&#8216;Birthdate&#8217;], null<strong>)<\/strong>, &#8221;,<\/p>\n<p><strong>formatDateTime(item<\/strong>s<strong>(<\/strong>&#8216;Apply_to_each_2&#8217;<strong>)<\/strong>?[&#8216;Birthdate&#8217;], &#8216;MM\/dd&#8217;<strong>))<\/strong><\/p>\n<p style=\"text-align: justify;\"><b>3<\/b>. Use \u201cis equal to\u201d operator for comparing the Date fields.<\/p>\n<p style=\"text-align: justify;\"><b>4<\/b>. Then use today&#8217;s date to compare the CRM Birthday field Date<\/p>\n<p style=\"text-align: justify;\"><strong>formatDateTime(utcNow()<\/strong>, &#8216;MM\/dd&#8217;<strong>)<\/strong><\/p>\n<p>If the above condition matches then as shown in above screenshot you can Send Email to the Contact for which the condition is successful, otherwise it will ignore the process.<\/p>\n<p style=\"text-align: justify;\">To send the email \u2018To\u2019 field is mandatory by using the below expression you will get the value of the field.<\/p>\n<p style=\"text-align: justify;\"><strong>item<\/strong>s<strong>(<\/strong>&#8216;Apply_to_each_2&#8217;<strong>)<\/strong>?[&#8217;emailaddress1&#8242;]\n<p style=\"text-align: justify;\">You can provide Subject and Body of the email as per your specifications.<\/p>\n<p style=\"text-align: justify;\">Yes condition will look like below screenshot<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-12938\" style=\"border: 5px solid #eeeeee; padding: 5px; margin: 5px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/09\/13Automatically-Send-Greeting-Email-on-Birthdays-using-Microsoft-Flow.png\" alt=\"Automatically Send Greeting Email on Birthdays using Microsoft Flow\" width=\"950\" height=\"722\" \/><\/p>\n<h2><strong>Conclusion:<\/strong><\/h2>\n<p>Using the steps above the user can automatically send email greetings on birthdays using Microsoft Flow.<\/p>\n<h2 style=\"text-align: left;\"><div class=\"su-heading su-heading-style-default su-heading-align-center\" id=\"\" style=\"font-size:15px;margin-bottom:5px\"><div class=\"su-heading-inner\">Generate Your Own New Leads Within Microsoft Dynamics 365 CRM<\/div><\/div><\/h2>\n<p><em>Contact us for a <a href=\"https:\/\/www.maplytics.com\/maplytics-download\/?utm_source=highvisits&amp;utm_medium=technicalblog&amp;utm_campaign=hMaplytics\" target=\"_blank\" rel=\"noopener\">demo<\/a> to know more about how <a href=\"https:\/\/www.maplytics.com\/?utm_source=highvisits&amp;utm_medium=technicalblog&amp;utm_campaign=hMaplytics\" target=\"_blank\" rel=\"noopener\">Maplytics<\/a> can help you to generate new leads from within Microsoft Dynamics 365 CRM.<\/em><\/p>\n<p><em><a href=\"https:\/\/www.maplytics.com\/?utm_source=highvisits&amp;utm_medium=technicalblog&amp;utm_campaign=hMaplytics\" target=\"_blank\" rel=\"noopener\">Maplytics<\/a> is a 5-star rated, preferred business app on the <a href=\"https:\/\/appsource.microsoft.com\/en-us\/product\/dynamics-365\/inogic.f6f3c73f-29de-4fa8-a396-87ea8a07b6c4?tab=Overview\" target=\"_blank\" rel=\"noopener\">Microsoft AppSource<\/a> that is Certified for Microsoft Dynamics 365 (CfMD) and comes with powerful features like Appointment Planning, Sales Routing, Territory Management, Heat Maps, Geo-analytical Dashboards and more that empower organizations to add more value to their CRM data, improve sales &amp; service processes, and achieve high ROI.<\/em><\/p>\n<p><em>Get your <a href=\"https:\/\/www.maplytics.com\/maplytics-download\/?utm_source=highvisits&amp;utm_medium=technicalblog&amp;utm_campaign=hMaplytics\" target=\"_blank\" rel=\"noopener\">free trial<\/a> from our Website or <a href=\"https:\/\/appsource.microsoft.com\/en-us\/product\/dynamics-365\/inogic.f6f3c73f-29de-4fa8-a396-87ea8a07b6c4?tab=Overview\" target=\"_blank\" rel=\"noopener\">Microsoft AppSource<\/a>!<\/em><\/p>\n<p><em>&#8216;If data is the new oil, location intelligence is ??\u201d<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2018\/09\/automatically-send-greeting-email-on-birthdays-using-microsoft-flow\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":12942,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,18,19,36,1985],"tags":[1153,1155],"class_list":["post-12926","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365","category-dynamics-365-v9-2","category-dynamics-crm","category-microsoft-flow","category-power-automate","tag-microsoft-flow-dynamics-365","tag-microsoft-flow-dynamics-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/12926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=12926"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/12926\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/12942"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=12926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=12926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=12926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}