Your First Logic App Workflow

Overview

This hands-on guide walks you through creating your first Azure Logic App workflow from scratch. By the end of this tutorial, you'll have built a complete workflow that receives HTTP requests containing order data and automatically sends email notifications. This demonstrates the core power of Logic Apps - connecting different services without writing code.

What You'll Learn

  • Creating a Logic App in the Azure Portal
  • Using the visual Logic App Designer
  • Configuring an HTTP request trigger
  • Adding and configuring an email action
  • Testing your workflow with HTTP requests
  • Monitoring run history and troubleshooting

Prerequisites

Before starting, you'll need:

  • An Azure subscription
  • An Office 365 or Outlook account for sending emails
  • Basic understanding of HTTP requests

Step 1: Create Logic App

Via Portal

  1. Search "Logic Apps (Consumption)" in Azure Portal
  2. Click Create
  3. Configure:
    • Name: my-first-logic-app
    • Subscription: Your subscription
    • Resource Group: Create new or existing
    • Location: Choose region
    • Plan: Consumption
  4. Click Review + Create
  5. Click Create

Step 2: Open Designer

  1. After deployment, go to Logic App
  2. Click Logic App Designer (under Development Tools)
  3. Choose "When a HTTP request is received" trigger
  4. Click Save

Step 3: Configure Trigger

Add JSON Schema (Optional)

Click "Use sample payload to generate schema":

{
  "customerName": "John",
  "orderId": "12345",
  "amount": 99.99
}

This creates fields you can use in later steps.


Step 4: Add Email Action

  1. Click + New step
  2. Search "Send an email (V2)"
  3. Select your Outlook/Office 365 account
  4. Configure email:
    • To: Your email address
    • Subject: New Order: @{triggerBody()['orderId']}
    • Body:
      New order received!
      
      Customer: @{triggerBody()['customerName']}
      Order ID: @{triggerBody()['orderId']}
      Amount: $@{triggerBody()['amount']}
      
  5. Click Save

Step 5: Test Workflow

Get HTTP URL

  1. Save the workflow
  2. Click on the HTTP trigger
  3. Copy the HTTP POST URL

Send Request

curl -X POST "https://management.azure.com/..." \
  -H "Content-Type: application/json" \
  -d '{"customerName": "John", "orderId": "12345", "amount": 99.99}'

Or use Postman/Insomnia.

Check Email

You should receive an email with the order details!


Workflow Structure

Trigger: HTTP Request (POST)
    ↓
Action: Send email (Office 365)
    ↓
End

View Run History

  1. Go back to Logic App
  2. Click Runs history
  3. View:
    • Start time
    • Status (Succeeded/Fucceeded with iterations/Failed)
    • Duration
    • Input/Output details

Tips for Success

  1. Test locally - Use tools like Postman
  2. Check history - See what went wrong
  3. Use expressions - Build dynamic content
  4. Save often - Auto-save isn't automatic

Real-Time Scenarios

Scenario 1: Order Processing Pipeline

A complete e-commerce order processing workflow:

HTTP Request (Order) 
    ↓
Parse JSON (Extract order details)
    ↓
Condition: Order amount > $1000?
    ↓ (Yes)
    → Send to Teams (High value order alert)
    → Create row in SQL (Log order)
    ↓ (No)
    → Create row in SQL (Log order)
    ↓
Response: Order confirmed

Steps in Logic App:

  1. HTTP trigger (receives order JSON)
  2. Parse JSON action (create schema from sample payload)
  3. Condition (check amount threshold)
  4. If true: Teams notification + SQL insert
  5. If false: SQL insert only
  6. Response action (return order confirmation)

Scenario 2: Data Processing & Storage

Process incoming data and store in multiple locations:

Blob Trigger (New file uploaded)
    ↓
Get blob content
    ↓
Parse JSON / Parse CSV
    ↓
Transform (Map fields to required format)
    ↓
Parallel branches:
    → Insert into SQL Database
    → Upload to different Blob container
    → Send summary email

Scenario 3: Scheduled Data Sync

Sync data between systems on a schedule:

Recurrence Trigger (Every 1 hour)
    ↓
HTTP: Get data from external API
    ↓
Condition: Is data not empty?
    ↓
    → For each item in array:
        → Update row in SQL
        → (If failed) Send alert email
    ↓
Create CSV blob (Backup of synced data)
    ↓
Send summary email (X records synced)

Scenario 4: File Processing Workflow

Process uploaded files automatically:

When a blob is added or modified (container: uploads)
    ↓
Get blob properties
    ↓
Condition: Is file type PDF?
    ↓ (Yes)
    → Extract PDF text (using Azure Functions or OCR)
    → Store extracted text in Azure Table
    → Move blob to "processed" container
    ↓ (No)
    → Move blob to "unsupported" container
    → Send email (Unsupported file type)

Scenario 5: Approval Workflow

Handle approval requests with Teams integration:

HTTP Request (Approval request)
    ↓
Create approval in Azure (or Teams Adaptive Card)
    ↓
Wait for response (until approved/rejected)
    ↓
Condition: Was approved?
    ↓ (Yes)
    → Call Azure Function (process request)
    → Send confirmation email
    ↓ (No)
    → Send rejection email
    → Log rejection in SQL

Scenario 6: Monitoring & Alerts

Monitor system health and send alerts:

Recurrence (Every 5 minutes)
    ↓
HTTP: Call Azure Monitor API (get metrics)
    ↓
Condition: Any metric exceeds threshold?
    ↓
    → For each failing metric:
        → Send Teams alert
        → Create incident in Azure (log)
        → Send email to on-call team
    ↓
Response: Health check completed

Common Patterns

Handling Arrays

Use For each loop to process multiple items:

For each (items from Parse JSON)
    → Condition: Check each item
    → Action: Process item

Error Handling

Use Scope with Configure run after:

  • Add a scope around actions
  • Configure scope to "run after" failure
  • Add error handling inside scope

Parallel Processing

Use Parallel branches for independent actions:

Action 1 ──┐
           ├──→ Next Action (after both complete)
Action 2 ──┘

Next Steps


Azure Integration Hub - Beginner Level