Table of contents

Official Content

When a new or updated blob is detected, the Azure function is triggered.

As stated in the Azure documentation, several methods exist to execute a function code based on changes to blobs in a storage container. The Azure Blob storage trigger for Azure Functions may be appropriate only for some cases, as detailed in Working with Blobs. This should only be used when the blob is small.

Besides, Azure's recommendation is to use events to trigger the function. So this solution is based on triggering the Azure Functions on blob containers using an event subscription. For more information see here.

Important note: This is a breaking change compared to GeneXus 18 Upgrade 11.

Summary

Deployment steps

First, read HowTo: Create a GeneXus Procedure to be deployed as an Azure or AWS Function.
To deploy the function, use the deployment tool. See HowTo: Deploy as Azure Functions.

Deployment Settings

The Trigger type property in the deployment unit should be "Blob" for this kind of function.

Blob Connection App Settings

At the Blob Connection App Settings section of the deployment dialog, you should set the following:

- Name: A name for the Azure cloud application setting containing the connection to the Blob Storage. It can already be defined in the cloud, or not. If not, you can use the deployment to create the app setting if you give a value to it at the following property.

- Value: Optionally give a value for the app setting that should contain the connection string of the Blob Storage. The deployment engine will create the app setting using this information.

image_2025113222259_1_png


Azure Cloud AppSettings:

image_2025113222750_1_png

Blob Storage Properties

At the Blob Storage Properties section of the deployment dialog, you should set the Blob Path.
The Blob Path indicates the Blob storage container and should include a name pattern. It can be a generic pattern like the following (between curly braces):

mycontainer/{name}

...or it could be a more complex pattern as detailed in the documentation.

Requirements

  • You require to have a general-purpose v2 storage account
  • A blob container 
  • After having deployed the Azure function you can build an enpoint URL (reference)

    Search for the blobs_extension key of the Function App.

    Create a new endpoint URL for the Blob Storage trigger based on the following example:
    https://<FUNCTION_APP_NAME>.azurewebsites.net/runtime/webhooks/blobs?functionName=Host.Functions.<FUNCTION_NAME>&code=<BLOB_EXTENSION_KEY>
  • Create the event subscription.
    An event subscription, powered by Azure Event Grid, raises events based on changes in the subscribed blob container. This event is then sent to the blob extension endpoint for your function (reference).

image_2025110205533_1_png

Function Inputs

The GeneXus procedure will have a signature as explained in HowTo: Create a GeneXus Procedure to be deployed as an Azure or AWS Function.

In this case, the EventMessage SDT will contain the following in each of its fields:

  • EventMessageId: The invocationId of the Azure Function
  • EventMessageSourceType: Blob
  • EventMessageVersion: ""
  • EventMessageDate: Date and time of execution
  • EventMessageData: URI of the file.                           
  • EventMessageProperties: Properties and Metadata of the Blob, including:
    • Uri: The blob's URI for the primary location.
    • name: The name of the file including its extension.

For additional configuration check the Azure documentation.

Scope

Generators: .NET
Note: Java is not supported yet, due to the Java SDK for Azure functions limitation on getting the Blob metadata.

See Also

Azure Functions

Last update: December 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant