Webhooks, Automation runbooks, Logic Apps as event handlers for Azure Event Grid events

An event handler receives events from an event source via Event Grid, and processes those events. You can use any WebHook as an event handler for events forwarded by Event Grid. The WebHook doesn't need to be hosted in Azure to handle events. Event Grid supports only HTTPS Webhook endpoints. You can also use an Azure Automation workbook or an Azure logic app as an event handler via webhooks. This article provides you links to conceptual, quickstart, and tutorial articles that provide you with more information.

Note

Even though you can use Webhook as an endpoint type to configure an Azure function as an event handler, use Azure Function as an endpoint type. For more information, see Azure function as an event handler.

Webhooks

See the following articles for an overview and examples of using webhooks as event handlers.

Title Description
Quickstart: create and route custom events with - Azure CLI, PowerShell, and portal. Shows how to send custom events to a WebHook.
Quickstart: route Blob storage events to a custom web endpoint with - Azure CLI, PowerShell, and portal. Shows how to send blob storage events to a WebHook.
Overview: receive events to an HTTP endpoint Describes how to validate an HTTP endpoint to receive events from an event subscription, and receive and deserialize events.

Logic Apps

Use Logic Apps to implement business processes to process Event Grid events. You don't create a webhook explicitly in this scenario. The webhook is created for you automatically when you configure the logic app to handle events from Event Grid. See the following tutorials for examples:

Title Description
Tutorial: Send email notifications about Azure IoT Hub events using Logic Apps A logic app sends a notification email every time a device is added to your IoT hub.
Tutorial: Respond to Azure Service Bus events received via Azure Event Grid by using Azure Functions and Azure Logic Apps Event Grid sends messages from Service Bus topic to function app and logic app.

REST example (for PUT)

{
	"properties": 
	{
		"destination": 
		{
			"endpointType": "WebHook",
			"properties": 
			{
				"endpointUrl": "<WEB HOOK URL>",
				"maxEventsPerBatch": 1,
				"preferredBatchSizeInKilobytes": 64
			}
		},
		"eventDeliverySchema": "EventGridSchema"
	}
}

Next steps

See the Event handlers article for a list of supported event handlers.