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.
The logic app where you need access to your Azure blob storage account. To start your logic app with an Azure Blob Storage trigger, you need a blank logic app.
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.
In the Azure portal or Visual Studio, create a blank logic app, which opens Logic App Designer. This example uses the Azure portal.
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)
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.
In the Container box, select the folder icon.
In the folder list, choose the right-angle bracket ( > ), and then browse until you find and select the folder you want.
Select the interval and frequency for how often you want the trigger to check the folder for changes.
When you're done, on the designer toolbar, choose Save.
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 the Azure portal or Visual Studio, open your logic app in Logic App Designer. This example uses the Azure portal.
In the Logic App Designer, under the trigger or action, choose New step > 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.
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
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.
From the Blob box, select the folder icon.
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.
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.
When you're prompted for connection information, provide these details:
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.
When you're done, choose Create.
For technical details, such as triggers, actions, and limits, as described by the connector's Swagger file, see the connector's reference page.
- For questions, visit the Azure Logic Apps forum.
- To submit or vote on feature ideas, visit the Logic Apps user feedback site.
- Learn about other Logic Apps connectors