Search code examples
azureazure-blob-storageazure-logic-appsazure-blob-trigger

Azure Logic App run trigger when Blob is added or modified


I have an Azure Logic app that has the following workflow :-

Current Logic app workflow

I want to use the "When blob is added or modified" trigger instead of the recurrence trigger. A new folder will be created every month, so the logic app needs to pick up the blob contents from the latest created folder in the container. I tried using the "when the blob is added or modified" trigger, but it gave no response. It just ran for a while and eventually timed out, giving no result.

I'm assuming, the trigger doesn't know from which folder to pick up the files from, since new folders are getting added.

Any advise on this? Thanks!


Solution

  • As Nacho mentioned, the "When blob is added or modified" trigger will not be fired on subfolder. For your problem, if you want the logic app be triggered every time when you add the new csv file into the blob storage. You can change the logic app from "When blob is added or modified" trigger to "When a HTTP request is received" trigger.

    When you click "Save" button, the trigger will generate a url for request. As I know you use rest api to get the billing invoice. You can request the url which generated by the trigger to trigger the logic app after you request the cost billing rest api.