Moinak
Moinak

Reputation: 145

Azure Storage account having container consisting of hierarchy folders :- Create automated email if file is not uploaded to selected folders

Pretty new to Azure world ,however I have tried to googling this but haven't found a good way to go about this . Let me describe the problem

I have a storage account in Azure . In the container we are storing various data files . The files are stored in tree hierarchy of folders ( Parent-> year -> month -> day).Each day new files get uploaded to the specific day folder . If the file for that specific day is not uploaded I would like to drop email notification

Please let me know if you guys have an idea of how I can get this done

I have managed to do this Basically use logic_app to monitor the storage account when blob is added to the storage account trigger an email

Is there are better way to do this ? I would like the logic to be if for specific folders in the container if there is no file by lets say 7pm everyday then drop email

Upvotes: 0

Views: 446

Answers (1)

Stanley Gong
Stanley Gong

Reputation: 12153

Try this: enter image description here

This is some explanation of this simple logic :

  1. You can create a schedule to trigger this logic every day at 7 PM.
  2. Use List Blob to check if there is any file in the folder let's say /2021/03/17 so I use the expression to combine a path for every day checking: concat('/',utcNow('yyyy/MM/dd')) In Azure storage, if there is no file uploaded to some path, this path not exists, List Blob will fail.
  3. Send an email to someone if List Blob fails, set run after here so that this action will run only after List Blob fails: enter image description here

enter image description here

I have tested on my side and everything works as excepted : enter image description here

enter image description here

Upvotes: 0

Related Questions