Use the Azure blob storage connector in a logic app
Use the Azure Blob storage connector to upload, update, get, and delete blobs in your storage account, all within a logic app.
With Azure blob storage, you:
- Build your workflow by uploading new projects, or getting files that have been recently updated.
- Use actions to get file metadata, delete a file, copy files, and more. For example, when a tool is updated in an Azure web site (a trigger), then update a file in blob storage (an action).
This topic shows you how to use the blob storage connector in a logic app.
Connect to Azure blob storage
Before your logic app can access any service, you first create a connection to the service. A connection provides connectivity between a logic app and another service. For example, to connect to a storage account, you first create a blob storage connection. To create a connection, enter the credentials you normally use to access the service you are connecting to. So with Azure storage, enter the credentials to your storage account to create the connection.
Create the connection
- An Azure account; you can create a free account
- An Azure Blob Storage account including the storage account name, and its access key. This information is listed in the properties of the storage account in the Azure portal. Read more about Azure Storage.
Before using your Azure Blob Storage account in a logic app, connect to your Azure Blob Storage account. You can do this easily within your logic app on the Azure portal.
Connect to your Azure Blob Storage account using the following steps:
Create a logic app. In the Logic Apps designer, add a trigger, and then add an action. Select Show Microsoft managed APIs in the drop down list, and then enter "blob" in the search box. Select one of the actions:
If you haven't previously created any connections to Azure storage, you are prompted for the connection details:
Enter the storage account details. Properties with an asterisk are required.
Property Details Connection Name * Enter any name for your connection. Azure Storage Account Name * Enter the storage account name. The storage account name is displayed in the storage properties in the Azure portal. Azure Storage Account Access Key * Enter the storage account key. The access keys are displayed in the storage properties in the Azure portal.
These credentials are used to authorize your logic app to connect, and access your data.
- Select Create.
Notice the connection has been created. Now, proceed with the other steps in your logic app:
Use a trigger
This connector does not have any triggers. Use other triggers to start the logic app, such as a Recurrence trigger, an HTTP Webhook trigger, triggers available with other connectors, and more. Create a logic app provides an example.
Use an action
An action is an operation carried out by the workflow defined in a logic app.
Select the plus sign. You see several choices: Add an action, Add a condition, or one of the More options.
- Choose Add an action.
In the text box, type “blob” to get a list of all the available actions.
In our example, choose AzureBlob - Get file metadata using path. If a connection already exists, then select the ... (Show Picker) button to select a file.
If you are prompted for the connection information, then enter the details to create the connection. Create the connection in this topic describes these properties.
In this example, we get the metadata of a file. To see the metadata, add another action that creates a new file using another connector. For example, add a OneDrive action that creates a new "test" file based on the metadata.
Save your changes (top left corner of the toolbar). Your logic app is saved and may be automatically enabled.
Storage Explorer is a great tool to manage multiple storage accounts.
View any triggers and actions defined in the swagger, and also see any limits in the connector details.