Search code examples
azureazure-blob-storageazure-function-appazure-blob-trigger

Azure Blob Trigger Not Firing


I am creating an Azure Blob Storage Trigger which is supposed to run every time a new file is dropped into the blob.

{
  "scriptFile": "__init__.py",
  "bindings": [
    {
      "name": "myblob",
      "type": "blobTrigger",
      "direction": "in",
      "path": "blob/{blobname}.{blobextension}",
      "connection": "PROPER_CONNECTION_STRING_IS_HERE"
    }
  ]
}

Once I upload this to my function app though, nothing happens when I drop a file in the blob. When I run the code/test portion of the function app, I am able to confirm that the code exists and runs. The problem is that it doesn't run automatically when I drop a file into the blob.


Solution

  • From the information you gave, I think you might write the connection string directly after the connection.

    If you develop in the cloud, you should write connection string in app setting.

    enter image description here

    Then you need to add the configured variable name to the back of the connection.

    enter image description here

    If your approach is the same as above, then I suggest you to check if the path in your Function.json is configured correctly.

    Or as Akash mentioned in the comments, if you use a blob-only account, or if your application has specialized needs, you can use Event Grid trigger.

    If it has not solved your problem, please give more information and I will try my best to help you solve this problem.