Introduction

Did you ever feel the need to run some pieces of code while building your workflows using Azure Logic Apps, and you quickly realized that you need to use and connect something else with your workflow, such as Azure Functions?

Besides the fact that Azure Functions is amazing to run pieces of code, you still need to create a Function App, store your code in a repo (in case you are working as a team, in your company, etc…), build a pipeline to deploy your code, maybe generate some ARM templates to follow the Infrastructure as Code principle, and create/configure your Function App while deploying your code.

So, does it really worth all these steps, to run small pieces of code with simple logic? Probably not.

Fortunately, the Azure Logic Apps’ team introduced an action named Inline Code, that enables us to run simple and small pieces of code, using Javascript, inside our Logic Apps’ workflows. This action is still in Preview mode, but you should be able to easily use it.

Prerequisites

To start using it, there are some steps you need to perform.

  • Create an Azure subscription. If you don’t have an Azure subscription, you can sign up for a free Azure account.
  • Create a logic app so then you can add your code snippet. If you don’t have a logic app, follow this quick and amazing Microsoft guide - Create your first logic app.
  • Create an integration account and link it to your logic app.

Once you have all the prerequisites, you can start using the Inline Code action. To use it, it is so simple as opening your Logic App, and on the designer, just add a new action and then select the group Inline Code and then action Execute Javascript Code (preview).

#azure #apps

Using Inline Code On Your Azure Logic Apps
1.45 GEEK