"Azure Functions is your code. Logic Apps is your workflow. Knowing which to choose saves weeks of architecture regret."

Quick Answer

Azure Functions is a serverless compute service where you write custom code (C#, Python, JavaScript) triggered by events. Logic Apps is a no-code/low-code workflow orchestration service with 400+ pre-built connectors. Use Functions when you need custom logic or data transformation; use Logic Apps when you're integrating SaaS apps and services without complex code.

Azure Functions Serverless code execution — write custom logic in C#, Python, JS, Java. Scales to zero. Billed per execution.
Logic Apps Visual workflow designer with 400+ connectors (Salesforce, SAP, Office 365). No code required for integration scenarios.
When to use Functions Complex data transformation, CPU-intensive processing, existing code libraries, or scenarios Logic Apps connectors don't cover
Certification relevance AZ-204 (Azure Functions hosting plans, triggers, bindings) and AZ-305 (integration architecture decisions)

What are Azure Functions?

Azure Functions is a serverless compute platform where you write individual functions triggered by events — HTTP requests, queue messages, timer schedules, blob uploads, and more. You write only the logic; Azure handles infrastructure, scaling, and billing (pay only for executions, not idle server time).

Key characteristics: Event-driven, scales to zero, supports C#, Python, JavaScript, TypeScript, Java, PowerShell. Up to 10 minutes execution (Consumption plan) or unlimited (Premium/Dedicated).

What are Logic Apps?

Azure Logic Apps is a visual workflow automation service. You design workflows using a drag-and-drop designer, connecting pre-built connectors (Triggers and Actions) to automate business processes across systems. No custom code required for standard integration scenarios.

Key characteristics: 400+ managed connectors (Office 365, Salesforce, SAP, Twitter, Dynamics 365), enterprise integration (EDI, XML), B2B capabilities via Enterprise Integration Pack (EIP), built-in retry policies.

Side-by-Side Comparison

Dimension Azure Functions Logic Apps
Development modelCode-first (any IDE)Visual designer / JSON workflow
LanguagesC#, Python, JS, Java, PowerShellNo code (expression language for transformations)
ConnectorsTriggers/Bindings (Storage, Service Bus, etc.)400+ managed connectors including SaaS
State managementStateless (use Durable Functions for state)Built-in workflow state and history
Long-running workflowsDurable Functions (fan-out, human approval)Native — built for long-running processes
MonitoringApplication InsightsBuilt-in run history + Application Insights
Pricing modelPer execution + GB-secondsPer action execution
Best forCustom logic, data transformation, APIsSaaS integration, business process automation

Decision Framework — When to Use Which

  • Use Azure Functions when: You need custom code logic, complex data transformation, CPU-intensive processing, you already have libraries/NuGet packages, or you need sub-second response times for HTTP APIs.
  • Use Logic Apps when: You're connecting SaaS systems (Salesforce → SharePoint, Outlook → Teams), you want business users to understand/modify the workflow, you need EDI/B2B processing, or you need enterprise connectors without custom code.
  • Use BOTH together: Logic Apps orchestrates the workflow and calls Azure Functions for custom logic steps. This is the most common enterprise pattern — Logic App handles the integration flow, Functions handle the complex transformations.

Real-World Example: Invoice Processing Pipeline

Email arrives in Outlook (Logic App trigger)
↓
Extract PDF attachment (Logic App action)
↓
Call Azure Function: parse invoice with custom OCR logic
↓
Logic App: check if amount > threshold (condition)
↓
  Yes → Logic App: post approval request to Teams
       → Wait for approval (Logic App - built-in wait)
       → If approved: Logic App: create record in Dynamics 365
↓
  No → Logic App: auto-approve → create record in Dynamics 365

In this pipeline: Logic Apps handles the orchestration (email → Teams → Dynamics 365 connectors), while Azure Functions handles the custom OCR parsing that no built-in connector provides.

Azure Functions Hosting Plans

  • Consumption — Scale to zero, pay per execution. Cold start possible. Max 10 min.
  • Premium — Pre-warmed instances (no cold start), VNet integration, longer execution. Higher base cost.
  • Dedicated (App Service) — Always on, predictable cost, same plan as web apps. Good if you already have App Service.

AZ-204 exam tests all three hosting plans — know when cold start matters (Consumption vs Premium) and when VNet integration is required (Premium or Dedicated).

Key Takeaways

  • Functions = code-first serverless compute. You write the logic, Azure runs it on demand.
  • Logic Apps = visual workflow automation. Connect SaaS systems without writing code.
  • Best pattern = both together: Logic Apps orchestrates, Functions execute custom logic.
  • Logic Apps has built-in state and run history — use it for long-running workflows requiring human approval.
  • Functions are better for performance-critical paths, complex transformations, and when you need custom library dependencies.
  • AZ-204 tests Functions hosting plans; AZ-305 tests architectural choice between them.