azure-functionsinputbinding

How to trigger Azure Function from any file uploaded to Azure Storage Account?


Single Azure Function. I want it to trigger from all files uploaded to an Azure Storage account. The Storage Account has multiple top-level containers, so I can't specify one container, must be the entire account.

How is the function.json file handled?

This doesn't seem to be triggering the Function:

{
    "scriptFile": "__init__.py",
    "bindings": [{
        "name": "myblob",
        "type": "blobTrigger",
        "direction": "in",
        "path": "{name}.json",
        "connection": "storage-dev"
    }]
}

Does the path need a leading /? ("path": "/{name}.json")


Solution

  • The way to achieve this is to use an EventGrid trigger rather than BlobTrigger. Thank you to @BowmanZhu over at this thread for guiding me.