Azure Logic Apps: Automating Blob Storage with Azure

Azure Logic Apps is part of Azure Integration PaaS, a suite of Azure-managed services for Enterprise Application Integration (EAI) and workflows. It offers a low-code / no-code paradigm for creating massively scalable integration systems with pay-as-you-go pricing.

Azure Logic Apps assists in creating and designing automated workflows that are capable of integrating services, systems, and applications. Azure Logic Apps is especially useful for use cases and scenarios where you need to coordinate actions across multiple systems and services. It helps automate repetitive tasks and orchestrate workflows on multiple services, saving time and reducing mundane tasks.

Use Cases:

  • SaaS Product Integration: Seamlessly connect and automate workflows between multiple SaaS applications.
  • Scheduled Tasks: Automate routine tasks by setting up time-based triggers for execution.
  • Data Integration and Transformation: Consolidates data from various sources, transform it, and send it to a central data repository.
  • Incident Management and Alerts: Monitor systems for incidents and automate alerts and responses for quick resolution.

Benefits:

  • Scalability and Flexibility: Logic Apps allow businesses to scale up or down according to their needs. The platform is highly flexible and can adjust according to workloads, helping users optimize costs and resources. There’s no need to provision or manage servers or infrastructure, as Azure handles these details.
  • Integration and Connectivity: Azure Logic Apps comes equipped with many connectors for various services, including both Microsoft and non-Microsoft offerings, thus enabling users to create workflows that align with their business needs.
  • Rapid Development and Deployment: Azure Logic Apps can help businesses reduce the time it takes to develop and deploy applications. The service’s user-friendly interface and pre-built templates are one of the Azure functions, making the development of workflows a quicker, more streamlined process.
  • Monitoring and Analytics: With azure logic apps, users can monitor the status and performance of workflows, access execution history, and analyze logs, giving users a visibility of workflow behavior.

Overview: This blog explores automating blob storage management using Azure Logic Apps, a powerful component of Azure's Integration Platform as a Service (PaaS). By leveraging a low-code/no-code approach, users can create scalable integration solutions that efficiently manage storage costs. A key use case involves automatically moving blobs from hot to cold storage containers based on their last modified date. This proactive strategy helps organizations reduce storage expenses while ensuring that infrequently accessed data is retained securely.

 Prerequisites:

  • Create an Azure Account If you don’t already have an Azure account, sign up at Microsoft Azure.
  • Concept of Azure Blob Storage account

Step-by-Step Guide:

Step 1: Create Storage Account.

Within storage account, create two Containers, test(in hot tier) and est(in cold tier).

Create Storage Account
Create Storage Account

In the container test, a blob is uploaded.

container test
container test

And the container est is left empty.

container est is left empty
container est is left empty

Step 2: Create Logic App

Now, create a Logic App that monitors the Blog Storage. Based on the blob's last modified date, blobs are automatically moved from one container to another.

monitors the Blog Storage
monitors the Blog Storage

Step 3: Create Logic App Workflow

Within Logic App, click on Logic App Designer to create a required workflow.

Logic App Designer
Logic App Designer

Once you are in the designer view, you will need to set a trigger as the first step.

set a trigger
set a trigger

Add a trigger

  1. Under Triggers, select the Recurrence. We configure it to run the logic app every week at the specified time (add parameter Start Time).
Add parameter Start Time
Add parameter Start Time

Once we select the trigger and have set up the connection, we will define the location where we want to check for new files.

Add an actions

  1. The next move is to list all blobs in a container. So, we add List blobs (V2) as a action.

Configure Blob Storage Connection: To use the blob action, we must create a storage connection.

  • Provide a connection name.
  • Choose the Authentication type as an Access key.
  • Provide the name of the Azure Storage Account.
  • Provide Access Key of Storage Account.
Access key 
Access key 

Access key to the storage account can be found in your previously created Storage Account resource.

Storage Account
Storage Account
  1. Once the connection is created, set up your List Blob(V2) action as follows

folder: path to your blob

path to your blob
path to your blob
  1. The next thing we need to do is to set up the for loop that will iterate through all of the blobs in the container, extract their Last Modified Date, and upload it to the cold tier, i.e., if files are not used regularly, they are passed to the cold tier which minimizes the cost of storage.You can use for each to traverse your blobs:
traverse your blobs
traverse your blobs
  1. Inside the For each loop, create Condition action to compare its time.

Each listed blob's age has to be checked. We need to add a condition to check how old the blob is before moving it to the required folder.

If the Last Modified Date of the blob is greater than 30 days, we move it to another container.

Last Modified Date
Last Modified Date

addDays expression:

addDays(utcNow('yyyy-MM-ddTHH:mm:ss'),-30,'yyyy-MM-ddTHH:mm:ss')
  1. If this condition is true, i.e., if the file was last modified before 30 days, we copy the blob to another container.
last modified 
last modified 
  1. And delete the blob from the existing container.
existing container
existing container

Step 4: Save and Run the Logic App

Logic App workflow:

Logic App workflow
Logic App workflow

Successfully running workflow:

Successfully running workflow
Successfully running workflow

In conclusion, Azure Logic Apps provide a robust framework for automating blob storage management, enabling organizations to minimize costs while efficiently managing their data lifecycle. Businesses can significantly streamline their storage operations by implementing a Logic App workflow that monitors and moves blobs based on their last modified dates. This approach reduces expenses associated with hot storage and simplifies data governance practices.\

Read More 

  1. DevOps as a Service and DevOps Solutions
  2. DevOps Outsourcing: How to Do it Successfully
  3. DevOps for Developers | A Comprehensive Guide in 2024
  4. What is CI/CD in DevOps: Process, Definition, Benefits, and Best Practices
  5. Maximizing Efficiency with DevOps Managed Services: Your Guide to Seamless Operations

Azure Logic Apps: Automating Blob Storage with Azure

Written By Sujata Dahal

Oct 16, 2024

An aspiring cloud engineer passionate about exploring cloud technologies. Currently focused on learning AWS and Azure, I aim to deepen my skills in cloud architecture and deployment. I enjoy sharing my journey and insights through blogging, connecting with fellow tech enthusiasts, and experimenting with new tools in the cloud space.

Latest Blogs

Recent Development In AWS: April 2025

AWS continues to roll out meaningful improvements, and the updates for April 2025 are no exception....


Chandra Rana

May 02, 2025

Outsourced IT Services for Small Business

With limited in-house resources and growing technology demands, small and medium-sized businesses (S...


Adex International

Apr 30, 2025

Docker Bridge Networking: In-Depth Guide to Setup, Connection, and Troubleshooting

Docker has changed the way we build and run applications by using lightweight, portable containers....


Ujwal Budha

Apr 30, 2025