Power Automate vs Logic Apps vs Custom Code: Automation Decision Guide
Choose the right automation platform for enterprise workflows. Covers Power Automate, Azure Logic Apps, and custom code approaches with decision criteria, cost analysis, and use case mapping.
Three options for automating business workflows in the Microsoft ecosystem: Power Automate (citizen developer), Logic Apps (pro developer/integration), and custom code (full control). Each has a sweet spot and a failure zone. Choosing wrong means either overpaying for simple flows, under-delivering on complex integrations, or building custom solutions for problems that Microsoft already solved.
This guide breaks down the comparison with decision criteria, detailed cost analysis across volume tiers, real-world examples, and the governance patterns needed to prevent automation sprawl.
Comparison
| Factor | Power Automate | Azure Logic Apps | Custom Code |
|---|---|---|---|
| Audience | Business users, citizen devs | Pro developers, integration team | Software engineers |
| Interface | Low-code visual designer | Visual designer + code view | Full code (C#, Python, Node.js) |
| Hosting | Microsoft managed (SaaS) | Azure managed (PaaS) | Self-managed (VMs, containers, Functions) |
| Connectors | 1,000+ pre-built | 450+ managed + custom connectors | Unlimited (you build them) |
| Error handling | Basic retry, run-after config | Advanced (scopes, try/catch, parallel branches) | Full control (any pattern) |
| Version control | Limited (solution export/import) | ARM/Bicep templates, Git integration | Git native |
| Testing | Manual testing only | Limited automated testing | Full unit/integration test suites |
| Monitoring | Power Automate analytics | Azure Monitor, Log Analytics | Application Insights, Datadog, any tool |
| Cost model | Per-user/month (flat) | Per-execution (consumption) | Infrastructure cost (pay for compute) |
| DLP policies | Power Platform DLP | Azure Policy | Custom implementation |
| Approval workflows | Built-in, Teams-integrated | Manual implementation | Manual implementation |
Choose Power Automate When
- Business users can build and maintain it themselves (IT doesn’t need to be involved)
- Workflow involves Microsoft 365 (Outlook, Teams, SharePoint, Planner)
- Simple approval flows with < 10 steps
- No complex branching, error handling, or retry logic needed
- Integration stays within the Microsoft ecosystem
Example: Expense Approval
Trigger: New SharePoint list item (expense submission)
→ Condition: Amount > $500?
→ Yes: Send approval to VP via Teams
→ VP Approves: Update SharePoint, send confirmation email
→ VP Rejects: Notify submitter with reason, log to Excel
→ No: Send approval to Manager via Teams
→ Manager Approves: Update SharePoint, send confirmation
→ Manager Rejects: Notify submitter
→ End: Log result to audit trail (SharePoint list)
Example: Automated Onboarding
Trigger: New employee added to HR system (Dataverse)
→ Create Microsoft 365 account
→ Add to relevant Teams channels based on department
→ Send welcome email with onboarding checklist
→ Create Planner tasks for IT setup (laptop, badge, etc.)
→ Notify manager that onboarding is in progress
Choose Logic Apps When
- System-to-system integration (ERP → CRM → Data Warehouse)
- Enterprise integration patterns (message transformation, routing, batching)
- Need VNet isolation (Integration Service Environment / Standard tier)
- Long-running workflows with durable orchestration (days/weeks, not minutes)
- Workflows are maintained by IT or dev teams, not business users
- Hybrid integration (on-premises + cloud)
Example: Order Processing Pipeline
{
"trigger": "When_HTTP_request_received",
"actions": {
"Parse_Order": {
"type": "ParseJson",
"content": "@triggerBody()"
},
"Validate_Inventory": {
"type": "Http",
"method": "POST",
"uri": "https://api.internal/inventory/check",
"body": "@body('Parse_Order')"
},
"Scope_Process_Payment": {
"type": "Scope",
"actions": {
"Charge_Card": {
"type": "Http",
"method": "POST",
"uri": "https://api.stripe.com/v1/charges"
},
"Record_Transaction": {
"type": "ApiConnection",
"connectionName": "sql-connection",
"body": "@body('Charge_Card')"
}
},
"runAfter": { "Validate_Inventory": ["Succeeded"] }
},
"Handle_Payment_Failure": {
"type": "Scope",
"actions": {
"Log_Error": { "type": "ApiConnection", "connectionName": "sql" },
"Notify_Support": { "type": "ApiConnection", "connectionName": "sendgrid" }
},
"runAfter": { "Scope_Process_Payment": ["Failed", "TimedOut"] }
}
}
}
Example: B2B Integration
Partner sends EDI order (AS2/SFTP)
→ Logic App parses EDI 850 (Purchase Order)
→ Transform to internal JSON schema
→ Validate against business rules
→ Create order in D365 Finance & Operations
→ Send EDI 855 (Acknowledgment) back to partner
→ Log to Azure Monitor for audit trail
Choose Custom Code When
- Sub-second latency requirements (< 100ms response time)
- Complex business logic (ML models, algorithms, decision trees)
- High-volume processing (> 10K transactions/minute)
- Full unit/integration test coverage is required by compliance
- Version control and CI/CD are non-negotiable (regulated industry)
- The logic is core intellectual property of the business
- You need to run on non-Microsoft infrastructure
Example: Real-Time Fraud Detection
# Azure Function processing payment events
async def process_payment(event):
features = extract_features(event)
risk_score = fraud_model.predict(features) # ML inference < 50ms
if risk_score > 0.85:
await block_transaction(event['transaction_id'])
await alert_fraud_team(event, risk_score)
elif risk_score > 0.5:
await request_additional_verification(event)
await log_decision(event, risk_score)
return {'risk_score': risk_score, 'action': decision}
Cost Comparison
| Daily Volume | Power Automate | Logic Apps (Consumption) | Azure Functions |
|---|---|---|---|
| 100 exec/day | $15/user × 5 = $75/mo | ~$3/mo | ~$1/mo |
| 1,000 exec/day | $75/mo (same) | ~$30/mo | ~$15/mo |
| 10,000 exec/day | $75/mo (still flat) | ~$150/mo | ~$30/mo |
| 100,000 exec/day | $75/mo (may need Premium at $40/user) | ~$800/mo | ~$100/mo |
| 1,000,000 exec/day | Premium: $200/mo (5 users) | ~$5,000/mo | ~$400/mo |
Key Insights:
- Power Automate pricing is per-user (flat). Cheap for low-volume per user, but per-user cost adds up with many users
- Logic Apps scale linearly with volume — predictable but expensive at high volume
- Custom code has the lowest marginal cost but highest upfront development cost
- Crossover point: Logic Apps become more expensive than Functions at ~5,000 executions/day
Decision Matrix
| Requirement | Power Automate | Logic Apps | Custom Code |
|---|---|---|---|
| Business user builds & maintains | ✅ | ❌ | ❌ |
| M365 integration (Teams, Outlook, SharePoint) | ✅ Best | ⚠️ Possible | ❌ Overkill |
| Enterprise system integration (SAP, D365, Salesforce) | ⚠️ Limited | ✅ Best | ✅ |
| Complex error handling & retry | ❌ | ✅ | ✅ |
| Version control / CI/CD | ❌ | ✅ (ARM/Bicep) | ✅ |
| High-volume processing (> 10K/min) | ❌ | ⚠️ Throttling | ✅ |
| Full unit testing | ❌ | ⚠️ Limited | ✅ |
| Low latency (< 100ms) | ❌ | ❌ | ✅ |
| Hybrid (on-prem + cloud) | ⚠️ Gateway | ✅ ISE/Hybrid | ✅ |
| Built-in approval workflows | ✅ Best | ❌ | ❌ |
Governance for Automation at Scale
Without governance, organizations end up with hundreds of undocumented flows built by people who have left the company.
| Governance Area | Power Automate | Logic Apps | Custom Code |
|---|---|---|---|
| Inventory | CoE Starter Kit dashboard | Azure Resource Graph | Git repos / service catalog |
| Ownership | Flow owner visible in admin center | Resource tags | Code owners file |
| DLP | Power Platform DLP policies | Azure Policy | Custom middleware |
| Lifecycle | Solution-based ALM | ARM/Bicep + CI/CD | Standard SDLC |
| Monitoring | Power Automate analytics | Azure Monitor + alerts | App Insights / Datadog |
Common Migration Paths
As automation needs evolve, organizations frequently migrate between platforms:
| Starting Point | Trigger to Migrate | Target | Migration Effort |
|---|---|---|---|
| Power Automate | Need version control, complex error handling | Logic Apps | Medium (redesign flows as ARM templates) |
| Power Automate | Volume > 100K/day, latency requirements | Azure Functions | High (rewrite as code) |
| Logic Apps | Multi-cloud requirement | Custom code + Dapr | High (architecture change) |
| Custom code (scripts) | Maintenance burden, no monitoring | Power Automate or Logic Apps | Medium (simplification) |
| Multiple tools (sprawl) | Governance issues, audit requirements | Consolidate to Logic Apps + Power Automate | High (inventory + rationalize) |
Anti-Patterns
- Automation sprawl — 200+ flows with no inventory, no owners, no documentation. Use the Power Platform CoE Starter Kit to get visibility.
- Power Automate for integration — Using Power Automate for system-to-system integration without error handling. Use Logic Apps instead.
- Custom code for approvals — Building custom approval UI when Power Automate’s Teams integration does it out of the box.
- One giant flow — A single flow with 100+ steps. Break into child flows or sub-orchestrations.
Checklist
- Automation complexity assessed (simple approval vs enterprise integration vs custom logic)
- Maintainer identified (business user vs IT team vs engineering team)
- Volume projections estimated at current and 10x growth
- Error handling requirements documented (retry, DLQ, alerting)
- Integration points mapped (which systems connect to which?)
- Cost modeled at current and projected volume
- Testing strategy defined (manual? automated? compliance requirement?)
- Governance model established (inventory, ownership, DLP)
- Hybrid/on-prem requirements identified
- Latency requirements assessed (real-time vs near-real-time vs batch)
:::note[Source] This guide is derived from operational intelligence at Garnet Grid Consulting. For automation consulting, visit garnetgrid.com. :::