Begineer in Logic apps

ankit kumar 101 Reputation points
2020-10-08T13:48:48.34+00:00

I have a Logic app which is getting triggered successfully on trigger action 'when a blob is created or updated'.

I would like the logic app to be triggered only for the blobs which are newly created and not for all blobs? so If i have blob A.txt, blob B.csv coming in my blob storage, my logic app actions should only be for A.txt and B.csv and not the existing blobs. I saw option is to use Event grid with logic app and I tried it but I am unable to get the blobs.

from Resource events , this is the response i get:

onnection  
Close  
Accept  
*/*  
Accept-Encoding  
gzip,deflate  
Accept-Language  
en  
Host  
northeurope.logic.azure.com  
Referer  
https://management.azure.com/subscriptions/test/resourcegroups/ml1-europe/providers/Microsoft.Logic/workflows/TestlogicAppname/triggers/When_a_resource_event_occurs/run?api-version=2016-10-01  
User-Agent  
Mozilla/5.0,(Windows NT 10.0; Win64; x64),AppleWebKit/537.36,(KHTML, like Gecko),Chrome/85.0.4143.83,Safari/537.36  
x-ms-client-session-id  
6448765928364238239423test3e  
x-ms-command-name  
Microsoft_Azure_EMA.  
x-ms-effective-locale  
en.en-us  
x-ms-client-request-id  
tdf72ft4-c8ff-466d-bcfd-747363hsy004  
sec-fetch-site  
same-site  
sec-fetch-mode  
cors  
sec-fetch-dest  
empty  
x-ms-arm-resource-system-data  
{"lastModifiedBy":"test@xyz.com","lastModifiedByType":"User","lastModifiedAt":"2020-10-08T13:34:03.8679659Z"}  
x-ms-arm-request-tracking-id  
872hg8e8-1241-487b-bb11-55dddmcbe72  
x-ms-correlation-request-id  
76278e8-1241-487b-bb11-55test2  
x-ms-routing-request-id  

my design looks like this

30993-image.png

Please guide on how can i get only the new blobs which are added and do the necessary action with them

Thanks

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,996 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 24,666 Reputation points Microsoft Employee
    2020-10-11T23:57:36.53+00:00

    Hello @ankit kumar , The trigger used by you "When resource event occurs" with event "Microsoft.Storage.BlobCreated" should trigger your logic app when a Blob is uploaded in the linked storage account. The trigger successfully executed for me when I uploaded the Blobs in the container or within any sub-folder, as shown below.

    31485-eventgridtrigger.jpg

    Sub-Folder
    31339-subfolderemail.jpg

    Parent directory
    31427-parentdir.jpg

    Please let me know if you need any additional help.