Azure Logic Apps Documentation

Samples and Scenarios for Azure Logic Apps

Explore a wide range of pre-built samples and common scenarios to help you build powerful automated workflows with Azure Logic Apps. These examples cover various integration patterns and use cases.

Common Scenarios

  • File Processing: Automatically process files uploaded to cloud storage (e.g., Azure Blob Storage, Dropbox) and route them to other services.
  • Data Synchronization: Keep data synchronized between different applications like Salesforce, SharePoint, and SQL Server.
  • Event-Driven Workflows: Trigger workflows based on events from various services, such as new emails, form submissions, or system alerts.
  • API Integration: Connect to RESTful APIs to fetch or send data as part of your workflow.
  • Approval Workflows: Automate approval processes for documents, requests, or expenses, notifying stakeholders at each step.

FTP to Azure Blob Storage File Transfer

This workflow demonstrates how to connect to an FTP server, download files, and upload them to Azure Blob Storage.

Trigger:

When a file is added to an FTP folder.

Actions:

  1. Download the file from FTP.
  2. Upload the file content to Azure Blob Storage.

Example Output (Blob Content):

{
  "fileName": "report_20231027.csv",
  "fileSize": 12345,
  "uploadStatus": "Success",
  "blobUrl": "https://yourstorageaccount.blob.core.windows.net/data/report_20231027.csv"
}

Email Notification on High CPU Usage

This sample triggers an email alert when an Azure Virtual Machine's CPU usage goes above a critical level.

Trigger:

An Azure Monitor alert condition is met (e.g., CPU percentage > 80% for 5 minutes).

Actions:

  1. Send an email notification via Office 365 Outlook or SendGrid.
  2. (Optional) Post a message to a Microsoft Teams channel.

Example Output (Email Body):

Alert: High CPU Usage Detected

Resource: MyWebAppVM

Metric: CPU Percentage

Current Value: 85%

Time: 2023-10-27T10:30:00Z

Post Tweets with Specific Hashtags to an RSS Feed

This workflow monitors Twitter for tweets containing a specific hashtag (e.g., #AzureDev) and adds them to an RSS feed.

Trigger:

When a new tweet is published matching a search query (e.g., "#AzureDev").

Actions:

  1. Parse tweet content.
  2. Add the tweet as an item to an RSS feed (e.g., using a custom API or a service that can manage RSS).

Example Output (RSS Feed Entry):

<item>
  <title>User @ExampleUser: Great update on #AzureDev!</title>
  <link>https://twitter.com/ExampleUser/status/1234567890</link>
  <description>The latest features are amazing. #AzureDev</description>
  <pubDate>Fri, 27 Oct 2023 11:00:00 GMT</pubDate>
</item>

Sync Salesforce Records to SharePoint List

This workflow synchronizes new or updated records from Salesforce (e.g., Accounts) to a SharePoint list.

Trigger:

When a record is created or updated in Salesforce.

Actions:

  1. Retrieve the Salesforce record.
  2. Check if the record already exists in the SharePoint list.
  3. If it exists, update it. If not, create a new item in SharePoint.

Example Output (SharePoint Item):

SharePoint List Item:

Title: Acme Corporation

Industry: Technology

Last Modified (Salesforce): 2023-10-27T09:45:00Z