@Michal Pipal Thanks for reaching and apology for the delay.
Confirming my understanding on your workflow:
Storage (events) --> Event Grid --> Service bus topic (endpoint) --> Logic App (Service bus triggered)
It looks like the issue may be observed with the larger/bigger files where the file was not completely uploaded, and your workflow gets triggered.
I believe you are filtering only with Microsoft.Storage.BlobCreated events at the event grid subscription end. Reviewing this document and in the note section you should also filter the event with FlushWithClose and not with CreateFile event which file when the file is created and not completely uploaded to the blob storage. If the file is not completely uploaded and you tried to access the blob path, then you would observe 404 error as you have observed.
For Azure Data Lake Storage Gen2, if you want to ensure that the Microsoft.Storage.BlobCreated event is triggered only when a Block Blob is completely committed, filter the event for the
FlushWithClose
REST API call. This API call triggers the Microsoft.Storage.BlobCreated event only after data is fully committed to a Block Blob. To learn how to create a filter, see Filter events for Event Grid.
The suggestion would be further filter the event with data.api value as data FlushWithClose at the event grid subscription end to resolve the issue.
Please "Accept Answer" if the answer is helpful so that it can help others in the community.