Every business has workflows that don’t quite work. Some companies have hopelessly disjointed systems that don’t talk to one another and rarely have any idea what each other is doing. Other times, companies have systems that work together to a point but require manual processes to move forward. Usually, these applications are missing the critical ability to talk and interact with one another. Azure answers to this age old problem with their service Logic Apps. Logic Apps allow you to easily build workflow integrations that bridge the gap.

So what are Logic Apps, and what benefit do they bring to the enterprise? How do Logic Apps compare to similar Microsoft offerings like Flow and Biztalk? Let’s explore these topics as well as walk through the creation of a Logic App in the Azure portal.

What are Logic Apps?

In a nutshell, Logic Apps automate tasks and business workflows in the Azure cloud. Systems, services and databases must be able to integrate with one another both inside and outside the confines of your business. Azure Logic Apps make these integrations possible whether they are happening in the cloud, on-premise or utilizing a healthy mix of both.

Because Logic Apps run in the cloud, they benefit from all the efficiencies of the cloud. There is no need to worry about performance or scaling because Microsoft takes care of that for you. There is no cost to set up a Logic App, and they follow the attractive pricing model of paying for only what you use. It is simple to create workflows visually through the Azure portal, and you have a suite of monitoring tools to keep your finger on the pulse of your app. The tricky proposition of integrating across platforms is free of complications whether its web, mobile or API.

Examples of Logic Apps in Action

The use of Logic Apps are only limited by your imagination. There are hundreds of built-in connectors that work right out of the box. It’s definitely worth the time to scroll through and get a feel for what is possible. Here are just a few ways you might use Logic Apps:

  • Posting a message to Slack when an event occurs in an application or service
  • Moving files to Azure Storage from an FTP server
  • Changing the logic of your application with the toggle of a switch
  • Doing sentiment analysis to monitor your Twitter feed to discover what responses need immediate attention

How do Logic Apps differ from Microsoft Flow?

For those who have used Microsoft Flow, Azure Logic Apps will look strangely familiar. This is because Microsoft Flow sits on top of Logic Apps, using it as the backbone of its service. Microsoft Flow offers business users a way to build automated workflows without needing to know what’s going on under the hood. This low-code, no-code approach caters well to its target audience, but more technical users can be left wanting. They may see Flow as constraining and being a nice tool with limitations. Azure Logic Apps remove those limitations.

Logic Apps allow IT professionals to build advanced integrations using B2B connectors. They also enable secure connections when the enterprise needs a channel to talk between the cloud and on-prem. Logic Apps can take advantage of professional management tools like Visual Studio. Workflows created in Flow can be converted into a Logic App.

What are connectors?

Connectors are at the heart of workflow automation with Logic Apps. Connectors allow Logic Apps to retrieve data, actions and events across applications and services. For each connector, there is an action and/or a trigger. The action is an event directed by the user. An example would be someone interacting with a SQL Server database. Triggers come in three different varieties — recurrence, polling and push. Recurrence and polling both operate on a schedule, continually reaching out looking for new data. They differ in that recurrence isn’t tightly coupled with a service or system whereas polling is. Push triggers wait for data to come over an endpoint. Each kick off a workflow based on the data that was retrieved.

Connectors fall into four different camps. There are built-in triggers and actions which are native to Azure Logic Apps. These would include things like creating scheduled workflows as well as interacting with other Azure services like API Gateway, Azure Functions and even calling other Logic Apps.

Managed API controllers are used when Logic Apps need to integrate into another system or application. With these connectors, you can easily tap into Microsoft services like Biztalk, Outlook, Sharepoint and SQL Server as well as third-party connectors like Slack, Box, Twitter and Salesforce. There are over 200 connectors to choose from.

On-prem connectors allow you to connect your on-premise applications with Azure Logic Apps. They require the installation and setup of an on-premise gateway to create the secure connection necessary for Logic Apps to talk to these applications.

There are also integrated account connectors. These integrations are for allowing Logic Apps to work with your business-to-business (B2B) solutions. This is made available through the Enterprise Integration Pack (EIP) which allows your system to talk in different formats and protocols like AS2, EDIFACT and X12. There are also enterprise connectors for those who need to plug into SAP and IBM MQ.

Azure Logic Apps versus Biztalk

The introduction of Logic Apps has given new life to the rumor that Biztalk is not long for this world. I’m happy to report that the demise of Biztalk is flat out false, and it will be with us for many, many years to come. Microsoft is due to release Biztalk 2020 (also referred to as vNext) at the end of 2019. This release is all about platform alignment, supporting things like SQL Server 2017, Windows Server 2019, Visual Studio 2019 and .NET Framework 4.8. For those living in the Biztalk universe, it’s fair to wonder how these two products will co-exist. Quite easily in fact.

Biztalk is software that is bought, put on hardware and all the responsibility for the install and maintenance falls on the user. To date, it is still the best option for an on-premises integration platform. Logic Apps operate as a Platform as a Services (PaaS) so everything gets managed by Microsoft through the Azure cloud. This allows it to easily scale in a way that traditional software like Biztalk can’t. Logic Apps simplify building automated workflows through its visual designer and seamlessly integrates cloud with on-prem. Logic Apps also work with existing Biztalk instances.

Logic App Pricing

The pricing behind Logic Apps is similar to how Azure Functions bill out. You are billed for each action that is triggered at tiny fractions of a cent. It is worth noting that this pricing model is per action so if your Logic App has ten actions that it performs, your price per execution would be multiplied by ten each time your workflow runs. It is also useful to note that using standard and enterprise connectors bump you into a higher pricing tier.

Integrated service environment (ISE) drops into a pricing category all on its own. These are fully isolated, dedicated connection environments used for connecting the Azure cloud with on-prem. They adopt an hourly pricing model.

Setting up a Logic App in the Azure Portal

It’s time to see what Logic Apps can do. For our sample app, we are going to create an HTTP endpoint that posts a message to a Slack when we call it. This is super handy when you need to notify the development team that something has gone wrong with an application.

First, we open the Azure portal, and do a search for “Logic Apps.” Once we enter the resource blade, clicking add brings up the configuration panel which you set the name of the Logic App, define the subscription, set the resource group as well as establish the location your Logic App will run in. After a short delay (30 seconds to a minute), you will receive an alert saying the app has been deployed. Once you see it in the main grid, you can do things like edit, disable, delete or clone.

Once you click on the app, go into the Logic App designer to start assembling the pieces of your app. You have the option of using a common trigger, a template or starting from scratch with a blank Logic App. For our sample app, we will select ‘When an HTTP request is received’ from the common trigger options. First, we are asked to define the JSON schema that the request body will use. By default, it will try to do a POST so you have to add a new parameter if you want to alter this action. Once you’ve saved the Logic App, Azure will create the URL endpoint for you to call from your application. Securing that endpoint is handled through shared access signature (SAS). Azure generates a key which is passed in as a parameter. That key must be validated before the Logic App will run.

Next, you’ll add another step to configure Slack. Before you type in Slack to filter down the possible connectors, scroll through so you can see the hundreds of available connectors and actions to choose from. After you search for Slack, look for the post message option. It will prompt you to authorize your account, and your Slack administrator will have to allow Azure Logic Apps access before you can post. Once authenticated, you can select the Slack channel you wish to post to, set message text and define any optional parameters. For this one, I’ve set it to post as user. The message text can be defined through dynamic content or expressions. If you click on code view along the top toolbar, you can see how the visual designer is storing the Logic App configuration as json.

Once you’ve saved out your configuration, you are ready to take your URL over to Postman to test out your newest Logic App. Within Postman, set the action to POST and paste in the URL generated by Azure. Your header key value pair should be set to Content-Type = application/json. Set the body of the call to raw and paste in the json value you want to post to Slack. Lastly, click send to trigger your Logic App workflow.

If you’ve setup everything correctly, you should see the message successfully post to your Slack channel. From start to finish, this was about a five minute setup which is about as painless as it comes.

Before you leave your Logic App, you’ll want to pay attention to a few helpful features Azure gives you to manage your app. Under development tools, you’ll find versions which catalog every save you’ve made to your Logic App. You can easily elevate a prior version by clicking on promote. Run history gives you a detailed look at what went right and wrong with your app during runtime. This can be helpful when troubleshooting problems that crop up. Lastly, explore the available options under monitoring. Like many Azure services, you can establish alert rules, setup logs, track metrics and diagnostics against your Logic App.

Managing Logic Apps through Visual Studio

Personally, I feel it’s easier to manage Logic Apps through the Azure portal, but you do have the option of managing them through Visual Studio 2015 or newer. The one key drawback is that you can’t create new Logic Apps within Visual Studio at present.

Getting up and running with Logic Apps in Visual Studio is straightforward. Simply install the Logic Apps extension by going to extensions > manage extensions > search under online for “Logic Apps.” It will prompt you to reboot Visual Studio so it can install the extension.

Once Visual Studio is back up, you can go into view > cloud explorer to see your cloud resources and specifically your Logic Apps. Simply choose the Logic App you want to manage, and select the option Logic App editor. This will bring up an editing tool that mirrors the Azure portal. Once you’ve completed your edits, click publish to push the changes up to Azure.

Those of you who have integrated with a third-party services in the past know it doesn’t come easy. It usually involves thumbing through hundreds of pages of API documentation while piecing together a solution over a number of days, Being able to put together an end-to-end solution in under five minutes is very impressive. Our sample app was basic, but Logic Apps can grow to be as complex as you need them to be. They can help ailing workflows to finally meet their business potential and offer new integration possibilities for applications that want to do more. Logic Apps really stand out as a service that can change the way we do business.