In the last article of the Azure Functions: Going Serverless on Azure Platform series, we created the first function ReceiveNotification, which is the first part of the function pipeline. In this article, we will start creating the second function which is the SendEmail function. We discussed in detail about how to configure the triggers and bindings in part 1 of this article. We will move a bit fast in this article creating the second function in the simple notification pipeline we are creating. Let’s start by creating the SendEmail function.

The SendEmail function is a Queue Triggered function, to create a queue trigger function you can click on the new Function button (Blue Plus icon) then select the language as C# and select Queue Trigger – C# template from the list of available templates, as we discussed in part 1. But there is a quicker way of creating the next function using a feature provided by the ReceiveNotification function.

1. create-send-email-function

Navigate to the Integrate section (1) of the ReceiveNotification function and click on the Azure Queue Storage Output binding (2). In the Actions section below the configuration options for the output binding, you can see a button to Create a new function triggered by this output. This makes it easy to create the next function that is triggered by the Azure Queue Storage trigger.

This method is quicker because SendEmail function is triggered by the message put into the queue by the ReceiveNotification function and this method will automatically wire up everything for you for your queue trigger to work properly. Click on the GO button (3) to create the next function.

Read the full article here

Written By : Kasun Kodagoda, Senior Software Engineer, 99X Technology