Connecting an Azure Logic App to a local Web API

Developer

Bryan Soltis demonstrates how you can test Logic Apps with your on-prem systems using a few cool tools and services.


Have you ever wanted to develop with Azure Logic Apps, but struggled to test things out until you’ve deployed? Don’t worry, you’re not alone. Logic Apps are an extremely powerful low-code/no-code solution for many problems, but do have some inherent limitations that may make things tricky when you’re just starting out your project locally. In this article, I’ll show you how you can test your Logic Apps with your on-prem systems using a few cool tools and services.

When it comes to Logic Apps, Azure has a ton of connectors to allow you to design your automation workflows to integrate to all sorts of systems. Nearly every major Microsoft service is there, along with a slew of 3rd party components and services. And if those don’t fit the bill, you can develop your own connectors to do just about anything you need to.

A common step in Logic App integration is to develop a Web API to interact with other systems. The API usually handles the database connections, exposing methods for apps to consume. Developing that API locally almost always is the easiest path, especially when you’re working with internal database/systems. Add a Logic App into the mix, and now we have a challenge. How will our Logic App be able to access the local API? Unlike many other Azure services, Logic Apps aren’t assigned a static IP address. This means they can’t be let through a firewall/gateway, causing network admins to lose it when it comes to keeping them secure.

To get around this, we can easily 2 components to the mix, allowing us to connect our local Web API to the Logic App. These are the ngrok utility and an Azure API Management Servicengrok allows us to create a secure, temporary tunnel to our local Web API, with a unique URL. APIM allows us to then use that URL for an endpoint for the Logic App to call, allowing us to call our methods. Because APIM’s can have static IPs, they can easily be whitelisted for any networks.

Check out the step-by-step example here.

0 comments

Comments are closed. Login to edit/delete your existing comments