Create your first logic app for automating workflows and processes through the Azure portal

Without writing code, you can integrate systems and services by building and running automated workflows with Azure Logic Apps. To show how easily you can automate tasks with a workflow, this tutorial creates a basic logic app that checks an RSS feed for new content on a website and sends an email for each new item in the feed.

Overview - first logic app example

In this tutorial, you learn how to:

  • Create a blank logic app.
  • Add a trigger for starting your logic app when an RSS feed item is published.
  • Add an action for sending email with details about the RSS feed item.
  • Run and test your logic app.

Prerequisites

1. Create a blank logic app

  1. Sign in to the Azure portal.

  2. From the main Azure menu, choose New > Enterprise Integration > Logic App.

    Azure portal, New, Enterprise Integration, Logic App

  3. Create your logic app with the settings specified in the table.

    Provide logic app details

    Setting Suggested value Description
    Name your-logic-app-name Provide a unique logic app name.
    Subscription your-Azure-subscription Select the Azure subscription that you want to use.
    Resource group your-Azure-resource-group Create or select an Azure resource group, which helps you organize and manage related Azure resources.
    Location your-Azure-region Select the datacenter region for deploying your logic app.
  4. When you're ready, select Pin to dashboard, then choose Create.

    You've now created an Azure resource for your logic app. After Azure deploys your logic app, the Logic Apps Designer shows you templates for common patterns so you can get started faster.

    Note

    When you select Pin to dashboard, your logic app appears on the Azure dashboard after deployment, and automatically opens in Logic Apps Designer. If not, you can manually find and open your logic app.

  5. For now, under Templates, choose Blank Logic App so that you can build your logic app from scratch.

    Choose logic app template

    The Logic Apps Designer now shows you available connectors and their triggers, which you use for starting your logic app workflow.

    Logic app triggers

2. Add a trigger for starting the workflow

Every logic app must start with a trigger. The trigger fires when a specific event happens or when new data meets the condition that you've set. The Logic Apps engine then creates a logic app instance for running your workflow. Each time that the trigger fires, the engine creates another separate instance that runs your logic app workflow.

  1. In the search box, type "rss" as your filter. Select this trigger: RSS - When a feed item is published

    Select trigger: "RSS - When a feed item is published"

  2. Provide the link for the website's RSS feed that you want to track, for example, http://rss.cnn.com/rss/cnn_topstories.rss. Set the interval and frequency for the recurrence. In this example, set these properties to check the feed every day.

    Set up trigger with RSS feed, frequency, and interval

  3. Save your work for now. On the designer toolbar, choose Save. To collapse and hide the trigger's details, choose the trigger's title bar.

    Save your logic app

    Your logic app is now live but doesn't do anything other than check for new items in the RSS feed until you add actions to the workflow.

3. Add an action that responds to the trigger

Now add an action, which is a task that your logic app workflow performs. In this example, add an action that sends email when a new item appears in the RSS feed.

  1. In the Logic Apps Designer, under the trigger, choose + New step > Add an action.

    Add an action

    The designer shows available connectors so that you can select an action to perform when your trigger fires.

    Select from action list

  2. In the search box, enter "send email" as your filter. Based on your email provider, find and select the matching connector. Then select the "send email" action for your connector. For example:

    • For an Azure work or school account, select the Office 365 Outlook connector.
    • For personal Microsoft accounts, select the Outlook.com connector.
    • For Gmail accounts, select the Gmail connector.

    We're going to continue with the Office 365 Outlook connector. If you use a different provider, the steps remain the same, but your UI might appear different.

    Select this action: "Office 365 Outlook - Send an email"

  3. When you're prompted for credentials, sign in with the username and password for your email account.

  4. Provide the details specified in the table and choose the fields that you want included in the mail.

    To Steps
    Select fields available for your workflow. Click inside an edit box so that the Dynamic content list opens, or choose Add dynamic content.
    View other available fields. In the Dynamic content list, choose See more for each section.
    Add blank lines in an edit box. Press Shift + Enter.
    Close the Dynamic content list. Choose Add dynamic content again.

    Select data to include in email

    Setting Suggested value Description
    To recipient-email-address Enter the recipient's email address. For testing purposes, you can use your own email address.
    Subject New CNN post: Feed title Enter the content for the email's subject.

    For this tutorial, enter the suggested text and select the trigger's Feed title field, which shows the feed item's title.

    Body Title: Feed title

    Date published: Feed primary link

    Link: Primary feed link

    Enter the content for the email's body.

    For this tutorial, enter the suggested text, then select these trigger fields:

    - Feed title, which shows the feed item's title again
    - Feed published on, which shows the item's published date and time
    - Primary feed link, which shows the URL for the feed item

    Note

    If you select a field that stores an array, the designer automatically adds a "For each" loop around the action that references the array. That way, your logic app performs that action on each array item.

  5. When you're done, save your changes. On the designer toolbar, choose Save.

    Completed logic app

    To test your logic app now, continue to the next section.

4. Run and test your workflow

  1. To manually run your logic app for testing, on the designer toolbar bar, choose Run. Or, you can let your logic app check the specified RSS feed based on the schedule that you set up.

    Run logic app

    If your logic app finds new items, the logic app sends email that includes your selected data, for example:

    Email sent for new RSS feed item

    If your logic app doesn't find any new items, the logic app skips the action that sends email and waits for the next interval before checking again.

  2. To review your logic app's runs and trigger history, on your logic app menu, choose Overview. To view more details about a run, choose the row for that run.

    Monitor and view logic app run and trigger history

    Tip

    If you don't find the data that you expect, on the toolbar, try choosing Refresh.

    Whether the run passed or failed, the Run Details view shows the steps that passed or failed.

    View details for a logic app run

    To learn more about your logic app's status, runs history, and trigger history, or to diagnose your logic app, see Troubleshoot your logic app.

  3. To view the inputs and outputs for each step, expand the step that you want to review. This information can help you diagnose and debug problems in your logic app. For example:

    View step details

    For more information, see Monitor your logic app.

Congratulations, you've now created and run your first basic logic app. This example shows how easily you can create workflows that automate processes for integrating systems and services - all without code.

Note

Your logic app continues running until you turn off your app. To temporarily turn off your app, continue to the next section.

Clean up resources

This tutorial uses resources and performs actions that might incur charges on your Azure subscription. When you're done with the tutorial and testing, make sure that you disable or delete any resources where you don't want to incur charges.

You can stop your logic app from running and sending email without deleting the app. On your logic app menu, choose Overview. On the toolbar, choose Disable.

Turn off your logic app

FAQ

Q: What else can I do with my logic app?
A: There are other tasks that you can perform, for example, edit, view the JSON definition, review the activity log, or delete your logic app.

To find other logic app management tasks, review these commands in the logic app menu:

Task Steps
View your app's status, runs and trigger history, and general information Choose Overview.
Edit your app Choose Logic App Designer.
View your app's workflow JSON definition Choose Logic App Code View.
View operations performed on your logic app Choose Activity log.
View past versions for your logic app Choose Versions.
Turn off your app temporarily Choose Overview, then on the toolbar, choose Disable.
Delete your app Choose Overview, then on the toolbar, choose Delete. Enter your logic app's name, and choose Delete.

Get support

Next steps