{"id":702,"date":"2020-01-22T10:36:26","date_gmt":"2020-01-22T09:36:26","guid":{"rendered":"http:\/\/daxvisionerp.com\/?p=702"},"modified":"2025-10-27T08:13:28","modified_gmt":"2025-10-27T08:13:28","slug":"my-first-flow-application","status":"publish","type":"post","link":"https:\/\/daxvisionerp.com\/home\/my-first-flow-application\/","title":{"rendered":"My first Power Automate (Flow) application"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Meeting with Flow<\/h3>\n\n\n\n<p>Through my brief journey with Dynamics 365 I\u2019ve encountered expressions like PowerApps, Flow and how good it is to fuse them together.<\/p>\n\n\n\n<p>That made me investigate these topics through Microsoft\u2019s e-learning documents. I learned that there are free, downloadable mobile apps related to them. It was interesting for me to see the result immediately on my phone, of what I\u2019ve created on desktop.<\/p>\n\n\n\n<p>After reading a few documents about Microsoft Power Automate \u2013 formerly known as Flow \u2013 I started thinking about how I could use it. There are hundreds of templates for various uses, so you can easily get inspired.<\/p>\n\n\n\n<p>At first, I created one from the \u201cGet today&#8217;s weather forecast for my current location\u201d template. I modified it to get tomorrow\u2019s weather forecast instead, but I wanted to create my own flow.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The idea of the Flow<\/h3>\n\n\n\n<p>I thought out a flow that sends a Push notification to your phone through the Flow app, whenever a new event is added to the Outlook calendar. I\u2019m quite sure that there is a function similar to this one in the official Outlook app, but it was good for practicing purposes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The execution<\/h3>\n\n\n\n<p>It was fairly straightforward to choose the trigger and the action. I just added the necessary fields from the dynamic content and filled the sentence out with my text.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-20.png\" alt=\"\" class=\"wp-image-703\"\/><figcaption class=\"wp-element-caption\">Base structure of the flow<\/figcaption><\/figure>\n\n\n\n<p>The notification informs you about the event\u2019s subject and organizer, the start and the end time of the event. <br>I formatted the dates, so that they were displayed like &#8217;01\/22 12:00 AM&#8217;. <br>See below the code that achieves this format.<br><code>formatDateTime(triggerBody()?['start'],'MM\/dd hh:mm tt')<\/code><\/p>\n\n\n\n<p>I tested the flow and it worked, so I thought about making it a bit more complex. I wanted to get notifications only on weekdays, so to achieve that I had to add conditions to my flow.<\/p>\n\n\n\n<p>After messing around with it and googling a bit I created these 2 conditions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-29-1024x597.png\" alt=\"\" class=\"wp-image-718\"\/><figcaption class=\"wp-element-caption\"><em>The conditions<\/em><\/figcaption><\/figure>\n\n\n\n<p>If it isn\u2019t the 6th or 0th day of the week \u2013 so Saturday or Sunday &#8211; then just jump right to the notification action. If it\u2019s Saturday then the notification should be delayed by 2 days, or if it\u2019s Sunday then delay the notification by a day.<\/p>\n\n\n\n<p>Below is the expression for the condition.<br><code>dayOfWeek(formatDateTime(triggerBody()?['createdDateTime'],'D')) <\/code> <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-26-1024x822.png\" alt=\"\" class=\"wp-image-714\"\/><figcaption class=\"wp-element-caption\"><em>Structure of the whole flow<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">The result<\/h3>\n\n\n\n<p>The notification that appears on your phone should look something like this<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/01\/image-22.png\" alt=\"\" class=\"wp-image-705\" style=\"width:475px;height:128px\"\/><figcaption class=\"wp-element-caption\"><em>The notification<\/em><\/figcaption><\/figure>\n\n\n\n<p>I was able to create this simple function within hours after I started reading related e-learning documents. You can find a lot more educational material about Power Automate on <a href=\"https:\/\/docs.microsoft.com\/en-us\/learn\/browse\/?products=power-automate\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.microsoft.com\/en-us\/learn\/browse\/?products=power-automate<\/a>.<\/p>\n\n\n\n<p><\/p>\n\n\n<div class=\"taxonomy-post_tag wp-block-post-terms\"><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/microsoft-flow\/\" rel=\"tag\">Microsoft Flow<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/microsoft-power-automate\/\" rel=\"tag\">Microsoft Power Automate<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/outlook\/\" rel=\"tag\">Outlook<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>Meeting with Flow Through my brief journey with Dynamics 365 I\u2019ve encountered expressions like PowerApps, Flow and how good it is to fuse them together. That made me investigate these topics through Microsoft\u2019s e-learning documents. I learned that there are free, downloadable mobile apps related to them. It was interesting for me to see the [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[1],"tags":[95,97,99],"class_list":["post-702","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-microsoft-flow","tag-microsoft-power-automate","tag-outlook"],"_links":{"self":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/comments?post=702"}],"version-history":[{"count":1,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/702\/revisions"}],"predecessor-version":[{"id":1387,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/702\/revisions\/1387"}],"wp:attachment":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/media?parent=702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/categories?post=702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/tags?post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}