Storage Accounts with Data lake Storage gen2 enabled allows us to create directories within container.
When we use When a blob is added or modified (properties only) trigger. It works fine for destination where we are looking for blobs inside containers but not inside any directories.
Even though we choose the location of this directory for When a blob is added or modified (properties only) trigger. The trigger won’t get fired when new blob is created or modified inside directory.
To overcome this, we can use event grid trigger When a resource event occurs.
Make sure Microsoft.EventGrid is registered under resource providers in subscription.
This is webhook type trigger and it registers a webhook with the endpoint. In this case it will be a specified path inside container of a storage account.
Note: the last forward slash ‘/’ after directory name is very important, otherwise you would not get the desired result.
Getting the content of those blobs:
For getting the content inside blobs we can use either HTTP action or get blob content (using path) action.
This is the data object returned after trigger got fired.
We can use either blobUrl or url element from data value to retrieve the path for getting blob content.
Expression Inside URI : triggerBody()?['data']?['blobUrl']
You can also use below expression to frame audience from url element of data object.
Expression inside Blob: split(triggerBody()?['data']?['blobUrl'],'.net/')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.