Use Logic Apps when an integration is mostly moving data between systems that already have connectors, with simple mapping and a clear sequence of steps. Use Azure Functions when the integration has real logic in it, such as complex validation, transformation or calculations, runs at high volume, or needs to be unit tested and reviewed like any other code. Plenty of good Azure integrations use both: a Logic App to orchestrate the steps and talk to SaaS systems, and Functions for the parts that are easier to write in code.
What is the difference between Logic Apps and Azure Functions?
Logic Apps is a workflow service. You build a workflow from a trigger and a sequence of actions, mostly in a visual designer, using ready-made connectors for systems such as Microsoft 365, SharePoint, SQL Server, SFTP and many SaaS products. Each run of a stateful workflow is recorded with the inputs and outputs of every step.
Azure Functions runs your own code when something happens: an HTTP request, a timer, a message on a Service Bus queue, an Event Grid event or a new file in storage. You write the logic, typically in C# and .NET, and Functions handles the hosting and scaling.
The real question is where the effort in your integration sits. If most of it is connecting to systems, Logic Apps saves work. If most of it is logic, code is usually clearer.
When should you use Logic Apps?
Logic Apps tends to be the better choice when:
- A connector already exists for each system. Authentication and the details of each API are mostly handled for you, which removes a lot of code.
- The flow is a sequence of steps rather than an algorithm. "When a file lands on SFTP, parse it, look up each customer in the CRM, create the records in finance and email a summary" maps naturally onto a workflow.
- You need to see what happened on each run. The run history shows every step's inputs and outputs, which makes support and troubleshooting much easier for people who don't read code.
- Volumes are moderate. Very high volumes are possible but can get expensive on the consumption-based plan, where you pay per action.
- Approvals or long waits are part of the process. A workflow can pause for a person to approve something, or wait for a reply, without you managing that state.
Logic Apps comes in two main forms. Consumption runs in shared, multi-tenant infrastructure and charges for each action that runs. Standard runs single-tenant on its own hosting plan, can hold several workflows in one app, and gives you more control over networking and deployment. If the integration needs to reach systems inside a private network, or you want workflows deployed and versioned together, Standard is usually the starting point.
When should you use Azure Functions?
Functions tends to be the better choice when:
- The logic is complicated. Mapping rules with many conditions, calculations, deduplication and validation against several sources are hard to read in a designer and easy to read in well-structured C#.
- You want automated tests. Code can be unit tested, reviewed in pull requests and deployed through the same pipeline as your other .NET applications.
- Volume is high or bursty. A Function triggered by a Service Bus queue can scale out to work through thousands of messages, and you pay for compute time rather than for each step.
- There is no connector, or the connector doesn't do what you need. Calling an unusual API, a SOAP service or a system with awkward authentication is often simpler in code than in a generic HTTP action.
- Your team already writes .NET. The same people who maintain your applications can maintain the integration without learning a separate tool.
The trade-off is that you own more. You write more of the error handling and logging that Logic Apps gives you by default, and you need Application Insights or similar set up properly to see what each run did. On the Consumption plan, Functions have an execution time limit, and HTTP-triggered functions must respond within a few minutes on any plan, so long-running work needs a different plan or a different design.
How do Logic Apps and Azure Functions compare?
| Logic Apps | Azure Functions | |
|---|---|---|
| How it's built | Visual designer, workflow stored as JSON | Code, typically C# and .NET |
| Connecting to systems | Large library of ready-made connectors | Client libraries or your own API calls |
| Complex logic | Possible, but hard to read and maintain | Natural fit |
| Testing | Mostly by running the workflow; Standard adds a unit test framework | Unit and integration tests in code |
| Seeing what happened | Run history for every step, built in | Logging you add, viewed in Application Insights |
| Retries | Configured per action | Partly from triggers, partly your code |
| Long waits and approvals | Built in | Possible with Durable Functions |
| Cost at high volume | Can climb quickly on the Consumption plan, which charges per action | Grows with compute used, not steps |
| Change control | Workflow JSON diffs are hard to review | Normal code review |
Can you use Logic Apps and Azure Functions together?
Yes, and it is often the best answer.
A typical example: a Logic App watches an SFTP folder for a supplier's price file. When one arrives, it calls a Function that parses the file, applies the pricing rules and returns the changes. The Logic App then updates the ERP system through its connector and emails a summary to the buying team. The awkward logic is in tested code. The connections, sequence and run history stay in the workflow, where support staff can see each step.
The reverse also works. A high-volume flow of orders runs through Service Bus and Functions, while a Logic App handles the occasional exception, such as notifying someone in finance and waiting for them to approve a manual correction.
If you want to stay in code for long-running, multi-step processes, Durable Functions gives you orchestration in C#: it can wait, call several steps in sequence or in parallel, and pick up where it left off after a restart. It suits teams who prefer code everywhere, though support staff lose the designer's step-by-step view of each run.
What are common mistakes with Logic Apps and Functions?
- Logic in the designer. Workflows with dozens of nested conditions and expressions become very hard to change. Once a workflow needs heavy logic, move that logic into a Function.
- Cost surprises. On the Consumption plan, every action costs money, including loops over large files. A workflow that processes each line of a big file as separate actions can cost far more than expected.
- Workflows nobody can redeploy. Workflows edited directly in the Azure portal drift from what is in source control. Deploy Logic Apps through a pipeline, the same as code.
- Missing logging in Functions. Without structured logs and a correlation ID that follows each item, a Function that fails overnight is hard to diagnose.
- Secrets in the wrong place. Use managed identities where the connection supports them, and keep any remaining secrets in Key Vault, referenced from app settings rather than pasted into workflow parameters.
How do you decide for your integration?
Ask these questions about each flow:
- Do connectors exist for the systems involved, and do they do what you need? If yes, Logic Apps removes a lot of work.
- How much logic is there beyond mapping fields? A lot points to Functions.
- What volume will it run at, including peaks? High volume points to Functions, or a Standard plan for Logic Apps.
- Who will support it? A team comfortable with code suits Functions. A support team that needs to see each run step by step suits Logic Apps.
- How will you test and release changes? If it must go through code review and detailed automated tests, put the logic in code.
If the answers point both ways, combine them. For how the messaging side fits in, see our guide to Azure Service Bus or Event Grid, and for the steps to settle before building, how to plan a systems integration.
We build integrations on Azure with Logic Apps and Functions, choosing per flow. Read more about our systems and API integration service and our work on Azure integration.
Email [email protected] with your brief.