Reputation: 236
I've created a Logic App triggered when a resource event occurs, but it's triggered twice for each blob created.
Logic App details:
Trigger type: When a resource event occurs
Subscription: abc
Resource Type: Microsoft.Storage.StorageAccounts
Resource Name: abcxyz
Event Type Item - 1: Microsoft.Storage.BlobCreated
Prefix Filter: /blobserv/default/subfold
Suffix Filter: .pdf
From what I can find online, an event is fired when writing to blob is initiated, and another event is fired when the writing has been completed. This would explain the Logic App being triggered twice.
I tried to update the Logic App to filter on blob size, but it appears to be the same value for both triggered runs.
Get Blob Metadata using path (v2):
Size: 41556
So, is there a way to know if the Logic App is firing off the creation or completion event or another way to filter out the creation trigger?
Upvotes: 1
Views: 1649
Reputation: 1227
I might have narrowed down your issue.
Every Put Blob Container
Operation triggers two events (Started
and Succeeded
)
| Operation name | Status |
| Put blob Container | Succeeded |
| Put blob Container | Started |
Adding filter at Logic app level
Operation name == Put Blob Container
and
Status == Succeeded
should address your concern
Upvotes: 1