How to start with Microsoft flow ?

Dear Friends,

Microsoft Flow is one of the hot product nowadays and it is not new. It is in the industry from the last few years. In this article, we will try to explore Microsoft Flow and know how it can be helpful to you with an example.

I have changed my writing style in this blog to resolve all the question which you might have if you are new to Microsoft Flow.

What is Microsoft Flow?

Microsoft Flow as the name suggests it helps in building the workflow to resolve business problems or we can say that It helps to automate workflow to resolve business needs or problems. It is basically part of the Microsoft Office 365 suites and mainly created to Business users or Business Analyst to solve or automate their business needs without having knowledge of different programming language like Java C# etc.

It makes you smarter to solve your problem with doing automating the steps. It is a graphical based tool to design flow to resolve any problem.

What are the different scenarios where I can use Microsoft Flow?

Now, you might be thinking of where you can use this. below are several business scenarios where we can use flow.

Examples :-

Email or Mobile Notification

Suppose, you are a marketing team head and you want a notification on your mobile whenever any new lead is generated, then in this case Microsoft Flow will help you.

Folder Watcher

Suppose, you are working on Printer server and your task is to continue watch files in a folder and if any new file arrived in that DropBox folder then you have to print it and share in the email to the XYZ person, then in this case also you can use flow.

Data collector

The other example is to dump the twitter data in your database. For example, you want to monitor what are the different tweets are coming on your newly launched product or product features so you can analyze the sentiments.

Streamline approval
your employee added a Leave request in your portal then Flow will send an email to the manager and as a manager you can approve or hold or cancel that request either directly from outlook message of from Flow itself as per your decision the result will be updated in your portal and a notification email sent to requester employee.

There might be tonnes of examples, or situations where we can use Microsoft Flow to automate and ease our work.

How it is different from Logic Apps?

Now, as you might have gone through my previous blogs and you might be thinking it is just like Logic Apps. So, my answer is yes, it is same as Logic Apps because it is created on top of  Logic Apps. but there are various different points where it differs from Logic Apps.

Below are some of them.

1. Flow is Office 365 suits part and an Individual application for which you don’t need Azure Subscription but for Logic Apps you required Azure Subscription.

2. Flow is developed for Business users /Business Analyst so, you don’t need to write complex code or modify the existing thing use Visual studio to enhance or create but Logic Apps is mainly for developers or people who have programming knowledge so if may require they can change the visual studio code.

What is the first step to start Microsoft Flow?

To start the flow you need to sign up on website https://flow.Microsoft.com. If you are office 365 users then you can sign in with that account or use any other email like Hotmail, outlook to sign up.

Now, you might be thinking about the pricing. There are 3 different plans available, free, Flow Plan1,  Flow Plan 2. depends upon your need you can choose any plan.

Indiandotnet_Microsoft_Flow_Price

Once you opted the plan and sing In after login you will get following home screen to proceed further or we can say this would be your play area where you can create different flows.

Indiandotnet_Flow_Home

Just, make you aware there are various predefined templates available which are created based upon various frequently business needs

Indiandotnet_Flow_Template

How does it work?

Now,  as mentioned earlier it is most likely Logic Apps. So, similar to Logic Apps it has the various connector.

Just think if the concept “if something happened then we have to do something”. So, basically this is based on Trigger and then Action. concept.

Example, An email came to your inbox (Trigger) then (Action) send a mobile notification.

There are more than 200+ connectors available to help you and ease your work.

Indiandotnet_Flow_Connection

Can we have a step by step example to try it out?

Yes, and believe me this is one of the important examples for all the blogger and they will surely, like it.

For a blogger the challenge is promoting his/her post and for which he/she needs to create a shorten URL either on (goo.gl or bitly.com)  and then share on Facebook, Twitter or other social media channel.

Now, this is again a time-consuming process. Now, what you think if we can automate this process.

So, our challenge is whenever a new post is added in the blog then our flow identify that trigger and then provide that link to bitly.com and create a short bitly link and then post the generated link to social media (but in this example I created the notification to make it short and sweet choosing existing template ).

Now with the assumption, you already created your account in the Flow and logged in successfully. we proceed further.

Let’s follow the step here

Indiandotnet_Flow_WordPress_Step_1

Step 1: A an existing template “When a post is created in ”WordPress create a Bitlink URL and send the notification” as shown in below figure.

Indiandotnet_Flow_Wordpress_2

Step 2: Now, as you can see we have to configure the btily authentication and allow Microsoft Flow to access bitly.com to create URL. as shown in the figure.

Indiandotnet_Wordpress_step_3

Step 3:- Once you allowed it.  in the next step, we have to give authentication and authorization to access our WordPress blog. So, whenever a new post came flow will identify. so, just provide access as shown in the below figure.

Indiandotnet_wordpress_Step_4

Step 4:- so far so good we have given authorization for bitly & our WordPress blog.  we don’t need to configure the next step because it would be automatically configured. Now, we are good to go. we have configured perfectly in a few clicks, just save the Flow and check the flow using flow checker option.Indiandotnet_flow_test_Step

If there is no error you found in Flow Checker just click the Test option as shown in below figure.

Indiandotnet_Flow_Office_Step_8

Step 5: Now, go to your blog and create a post and publish it. You will be surprised that your flow automatically identified the new post and created a short URL and notify you as well.

You can see all the flow steps are checked it means the flow is successful.

indiandotnet_Flow_WordPress_11

Step 6: Now, you can check bitly.com and you can find the URL is created and also you got the notification.

Indiandotnet_Flow_Wordpress_12

Step 7: You can check each step detail as well by clicking the object

Indiandotnet_Flow_WordPress_Step_13

So we are good with the flow example.

Please, share your input on how you like the flow and this post  Smile

Happy learning

Azure Logic APPS–A simplest way to Automate your Business Process

As you may aware Microsoft Azure provides you a bunch of services, feature and Azure Logic Apps is one of the best Service which Microsoft provides to automate, orchestrate tasks, business process etc.

Logic Apps is the simplest visual designer solution to solve your simple to advance problem without writing a complex logic.

Indiandotnet_Microsoft_Logic_App

I know you might be thinking where we can use this. So my answer is everywhere in your business where you might need some kind of automation. Let’s understand the need with a few examples here.

Example:- Suppose, you are a business owner and most of the customer contact you via email. So, whenever a mail comes with subject invoice or new order you read those email carefully and depending upon the the subject you either send then to Account department  or Production team moreover if the email is coming from new client then you add his basic details in your system and once the production team update status of work complete and notify you. You again send the completion confirmation to end client.

Now, all these processes which we have gone through are in the different system and most of them required human interaction, for example, identifying the new client and firstly make their entry in the system.

So, this whole process can be automated using Azure Logic Apps.  So, in the above problem, Azure Logic Apps firstly read your email and identify the specific subject’s email. Once those identify check the email address in your client repository whether that exists or not if not exists then will add in the client repository.

In the next step, Logic Apps send detail to the production team or Account system. Also, keep eye on the database of the production team and when they trigger order complete send an email or SMS to end client.

And believe me, all this complex logic you can achieve in Logic Apps without writing complex code but using designer object provided in Azure logic Apps.

One more thing which I have faced personally if you worked  in supply chain system especially E-Pedigree, EPCIS & EDI then you might need to work on complex XML, AS2 format files for which you have to write complex code but with the help of Logic Apps this can be few steps job  and without writing any complex code.

Few more example like

1. Connect with Facebook and find the negative post and remove from your wall.

2. Fetch Tweets and  either retweet or find the sentiment

3.  Fetch newly added detail from SQL Server/ CRM/ Sales Force and send a welcome SMS or Email.

There are tones of the example where Logic Apps workflow makes your life easy.

Let’s understand the main component of Logic Apps which is a Connector.

These connectors will help you to connect with various API, protocols, integration account and enterprise account connector.

Now, to proceed further let me tell you there is more than 200 connector (predefine components) available to help you in achieving your goal.

connector

Every connector   has two main parts which are Action & Trigger

By the name, it is clear that Action is the action item needs to be taken and Trigger will help us to define when to take the action.

Now,  Lot’s of theory here let’s understand this by a step by step simple example. The problem statement is whenever an Email comes to our Office 365 account we will create a file in Dropbox and the file will content the email body. Isn’t it cool?

Prerequisites:- The first and most important prerequisites here is that you should have Microsoft Azure portal Account.

Step 1: Login to Microsoft Azure Portal  https://portal.azure.com/  using your credentials

Step 2: Once the login is done the next step is to click on All services and find integration option when you click on that option you will get Logic Apps option as shown in below figure.

Logic_Apps_1

Step 3: When you click on the Logic Apps option you will get the following screen. Here if you have not created any Logic Apps earlier then the grid will show blank. So just click on Create Logic Apps option or Add button

Indiandotnet_Logic_Apps_2

Step 3:-  You will get the following screen after using Add new Logic Apps option. Where you need to provide your application name and select the subscription, and use the existing resource group or create new. At last, need to select the location where to deploy the app. Once you are done with this just Click on Create button in the bottom of the screen.

Indiandotnet_Logic_App_3

Step 4: – Now, it will take a few minutes to complete and you will get following notification that application is deployed.

Indiandotnet_Logic_Apps_4

Step 5: Now open this application by going back to Logic Apps Resource Grid or Pin the Application on Dashboard by clicking Pin To Dashboard option and open from Dashboard.

Indiandotnet_Logic_App_5

Step 6:  Now when you click on open you will following screen. Where you can choose any predefined template which fulfils your business needs. But in this example, we are taking option Add new Logic App and proceed further

Indiandotnet_Logic_Apps_5

Step 7: You will get the following screen after clicking New Logic Apps option.

Indiandotnet_Logic_Apps_6

Step 8:  Now when you click on Connector you will find there is various connector available which you can choose. In this example we are taking Office 365 outLook email connector

Indiandotnet_Logic_Apps_7

Step 9: When you click on OutLook option you will get a new screen where you will find the different trigger on which you want to take action. To make this example simple we are choosing the option when a new Email Arrives

Indiandotnet_Logic_Apps_8

So, it means whenever a new Email comes to the outlook we will do something. Now when you click on When A new Email Arrives it will ask you Outlook credential

Indiandotnet_Logic_Apps_9

Step 10:  Give proper credentials and allow the Logic Apps to access Office 365 email.

Indiandotnet_Logic_Apps_10

Step 11:-  Once you allow Access then you will get the following screen where you need to define the different option value. For example how frequently mail need to be check etc

Indiandotnet_Logic_Apps_11

Step 12:- Now, what we need to do here, whenever a new mail found we will create a file in Dropbox. So just add Create a file in dropbox connector for next step.

Indiandotnet_Logic_App_Drop_Box_Finding

Step 13: As obvious, you have to provide drop box access to Logic Apps to further action. So, just press the allow button.

Indiandotnet_Logic_App_Drop_Box_Access

Step 14:-  Once you authorized in the next step you have to configure the dropbox like where should we save file folder path in the current example we are saving the file in root folder.

Next what is the file name so, we are creating email subject as the file name. and to view it properly we will append the extension HTML in the filename.

Next property is file content, so we are going to save email body (email content) in the file.

Indiandotnet_Logic_Apps_Dropbox_Setting

You can configure the properties as per your ease.

Indiandotnet_Logic_Apps_DropBox_Settings

Step 15: Just save the Logic Apps and  hit the run button to test it further

Indiandotnet_Logic_App_Hit_Run_Button1

Step 16: To make sure it is working properly, we are going to send an email from my personal Gmail to my office 365 account

Indiandotnet_Logic_Apps_Email

Step 17: Now, once we send this email to my office 365 account. The logic app should create a new file in my dropbox. As you can see in below figure it showing WOW Azure Logic App.html as expected.

Indiandotnet_Logic_Apps_Dropbox_View

Step 18: Now, we will try to open it and check the content of the file and WOW, it is working as per our expectation.

Indiandotnet_Logic_Apps_File_Conent

So, we have created our first simple Azure Logic App without writing a single line but handled a complex logic.

In my next few post, we will see more inside of Azure Logic Apps.

I hope you may like this post.

Happy learning.