DEV Community

Toluwani Oluwaloseyi
Toluwani Oluwaloseyi

Posted on

How to create a Function App with a Webhook, add HTTP triggered function(a hello message with your name) and test it.

Image description

A function app lets you group functions as a logical unit for easier management, deployment, scaling, and sharing of resources.

A webhook allows an external service to start a particular runbook in Azure Automation through a single HTTP request. The webhook sends the information about the event to the specified URL, which can then trigger a specific action in the receiving application. For example, a webhook might be used to send a notification to a chat application when a user subscribes to a particular channel.

The HTTP trigger lets you invoke a function with an HTTP request. You can use an HTTP trigger to build serverless APIs and respond to webhooks.

Step 1:

Visit portal.azure.com, login or sign up if you don't have an account, you can get a free account at azure.microsoft.com/en-us/free/

Step 2:
Search for function app and click on create

Image description

Step 3:

  1. Subscription: Choose the subscription where you wish to create the resource.
  2. Resource group: Choose the resource group where you wish to create the resource. If you wish to create a new group click on create a new option.
  3. Function App name: Enter a preferred unique name.
  4. Do you want to deploy code or container image?: Code
  5. Runtime stack: .NET
  6. Region: Select the location where you wish to create the account. Leave the rest on default and click on "Review+Create"

Image description

Step 4:
Create

Image description

Step 5:
Your function app has been successfully deployed! Click on "Go to Resource"

Image description

Step 6:
To create an HTTP trigger function, click on "Functions" and then click on "create"

Image description

Image description

Step 7:
Select "HTTP trigger", give it a new funcion name and click on "create"

Image description

Step 8:
Your HTTP trigger function hs been successfully created!

Image description

Step 9:
When something is triggered, that's when the code runs so to test the trigger function that was created, click on "get function Url" and copy to clipboard.

Image description

Step 10:
Paste the copied Url in a new tab, before pressing enter, add &name=Tolu and press enter.

Image description

Image description

Thank you for reading...

Top comments (0)