Create and manage blobs in Azure blob storage with Azure Logic Apps

This article shows how you can access and manage files stored as blobs in your Azure storage account from inside a logic app with the Azure Blob Storage connector. That way, you can create logic apps that automate tasks and workflows for managing your files. For example, you can build logic apps that create, get, update, and delete files in your storage account.

Suppose that you have a tool that gets updated on an Azure web site. which acts as the trigger for your logic app. When this event happens, you can have your logic app update some file in your blob storage container, which is an action in your logic app.

If you don't have an Azure subscription, sign up for a free Azure account. If you're new to logic apps, review What is Azure Logic Apps and Quickstart: Create your first logic app. For connector-specific technical information, see the Azure Blob Storage connector reference.

Prerequisites

Add blob storage trigger

In Azure Logic Apps, every logic app must start with a trigger, which fires when a specific event happens or when a specific condition is met. Each time the trigger fires, the Logic Apps engine creates a logic app instance and starts running your app's workflow.

This example shows how you can start a logic app workflow with the Azure Blob Storage - When a blob is added or modified (properties only) trigger when a blob's properties gets added or updated in your storage container.

  1. In the Azure portal or Visual Studio, create a blank logic app, which opens Logic App Designer. This example uses the Azure portal.

  2. In the search box, enter "azure blob" as your filter. From the triggers list, select the trigger you want.

    This example uses this trigger: Azure Blob Storage - When a blob is added or modified (properties only)

    Select trigger

  3. If you're prompted for connection details, create your blob storage connection now. Or, if your connection already exists, provide the necessary information for the trigger.

    For this example, select the container and folder you want to monitor.

    1. In the Container box, select the folder icon.

    2. In the folder list, choose the right-angle bracket ( > ), and then browse until you find and select the folder you want.

      Select folder

    3. Select the interval and frequency for how often you want the trigger to check the folder for changes.

  4. When you're done, on the designer toolbar, choose Save.

  5. Now continue adding one or more actions to your logic app for the tasks you want to perform with the trigger results.

Add blob storage action

In Azure Logic Apps, an action is a step in your workflow that follows a trigger or another action. For this example, the logic app starts with the Recurrence trigger.

  1. In the Azure portal or Visual Studio, open your logic app in Logic App Designer. This example uses the Azure portal.

  2. In the Logic App Designer, under the trigger or action, choose New step > Add an action.

    Add an action

    To add an action between existing steps, move your mouse over the connecting arrow. Choose the plus sign (+) that appears, and then choose Add an action.

  3. In the search box, enter "azure blob" as your filter. From the actions list, select the action you want.

    This example uses this action: Azure Blob Storage - Get blob content

    Select action

  4. If you're prompted for connection details, create your Azure Blob Storage connection now. Or, if your connection already exists, provide the necessary information for the action.

    For this example, select the file you want.

    1. From the Blob box, select the folder icon.

      Select folder

    2. Find and select the file you want based on the blob's Id number. You can find this Id number in the blob's metadata that is returned by the previously-described blob storage trigger.

  5. When you're done, on the designer toolbar, choose Save. To test your logic app, make sure that the selected folder contains a blob.

This example only gets the contents for a blob. To view the contents, add another action that creates a file with the blob by using another connector. For example, add a OneDrive action that creates a file based on the blob contents.

Connect to storage account

Before your logic app can access any service, you must create a connection between your logic app and that service. If you didn't previously create this connection, you're prompted for connection information when you add a trigger or action for that service to your logic app. The Logic Apps Designer provides an easy way for you to create this connection directly from your logic app.

  1. When you're prompted for connection information, provide these details:

    Required

    Property Value Description
    Connection Name <connection-name> The name to create for your connection
    Storage Account <storage-account> Select your storage account from the list.

    For example:

    Create connection

  2. When you're done, choose Create.

  3. After you create your connection, continue with Add a trigger or Add an action.

Connector reference

For technical details, such as triggers, actions, and limits, as described by the connector's Swagger file, see the connector's reference page.

Get support

Next steps