Integrating .NET Code in Standard Logic Apps

Published by Maia SUTTER
Category : .Net / Logic Apps
06/11/2025

When using standard Azure Logic Apps, sometimes the available actions are not sufficient for the workflow’s data handling. The workflow may require more hands-on treatment or transformation. In these case, it becomes interesting to be able to integrate .NET code into a Logic App workflow.

In the past, solutions included HTTP calls to a Function App with the custom logic or developing a custom connector to call code. However, these solutions require additional development and costs. Now it is possible to integrate code directly using a specialized action that can reference deployed custom functions.

 

Development

 

Developing integrated code in standard Logic Apps is currently only possible using Visual Studio Code. With the most recent version of the Azure Logic Apps (Standard), the code project template provides a set-up that allows you to quickly get started. The workspace for integrated code should have two projects inside it. One is for the function code, which will be built separately, and the other is for the workflow.

Within the function code workspace, you can develop functions to use in your Logic App. You can also include any classes, helper methods, or other code they may need. The functions use a special trigger, the WorkflowActionTrigger. Within the function, you can apply transformations, custom business logic, validate and parse data, even make calls to outside components to collect more information.

 
A sample of code used in the test backend.
 

 

Testing

 

You can also test and debug the code in the workflow directly in Visual Studio Code, without having to deploy to Azure. This means first compiling and building the code. You can use the shortcut menu in the Explorer menu to build the project. This will create certain files in subfolders automatically in the Logic App project. These are the .dll files needed to run the code and a function.json file.

From there, you can open the workflow designer, use the “Call a local function in this logic app” action, and input the function name and inputs. You can adjust the rest of the workflow to other necessary actions, or just keep it simple to test the code itself.

 

 

To run the workflow, activate the Azurite storage emulator for blobs, queues, and tables. Once that’s done, you can attach the debugger to both projects, selecting “Run/debug logic app with local function” from the Run and Debug list. Then, from the workflow’s overview page, you can run the trigger.

 

 

If you’re using an HTTP trigger, you can also call the provided URL from an extension or program such as Thunder Client, Bruno or Postman.

 

 

 

Deployment

 

To deploy the integrated code, you can choose to deploy directly from Visual Studio Code, or to use a CI/CD approach. In either case, you’ll need to make sure you’ve built the code so that the necessary assemblies are in the correct folder. To deploy directly from Visual Studio Code, you can right click in the Explore window and select the “Deploy to logic app” option.

 

 

Make sure you select the Logic App project folder when deploying, as that is the folder that contains both the code assemblies and the Logic App workflow. Otherwise, the deployment is the same as for a classic Logic App project.

 

Constraints

 

As mentioned earlier, the integrated code development is only possible using an extension in Visual Studio Code running on a Windows machine. However, you can add the workflow action to call a function using the Portal after you’ve deployed code to the Logic App from Visual Studio Code.

While the functions can do a variety of complex treatments, bounded only by .NET capabilities, they do have limits. Integrated code functions are not meant for long processing times (over 10 minutes) or for handling large amounts of data. They are also not meant for batch or streaming situations.

 

Conclusion

 

Using integrated code in standard Logic Apps is a great solution for implementing complex logic or transformations within the framework of a Logic App. It allows developers to take advantage of .NET functionalities and provides more flexibility. It does require using Visual Studio Code, but this also permits direct testing and debugging without having to deploy first.