title | description | ms.topic | ms.date |
---|---|---|---|
Webhooks as event handlers for Azure Event Grid events |
Describes how you can use webhooks as event handlers for Azure Event Grid events. Azure Automation runbooks and logic apps are supported as event handlers via webhooks. |
conceptual |
09/15/2021 |
An event handler is the place where the event is sent. The handler takes some further action to process the event. Several Azure services are automatically configured to handle events. You can also use any WebHook for handling events. The WebHook doesn't need to be hosted in Azure to handle events. Event Grid only supports HTTPS Webhook endpoints.
Note
- Azure Automation runbooks and logic apps are supported as event handlers via webhooks.
- 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.
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. |
Quickstart: send container registry events | Shows how to use Azure CLI to send Container Registry events. |
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. |
You can process events by using Azure Automation runbooks. Processing of events by using automated runbooks is supported via webhooks. You create a webhook for the runbook and then use the webhook handler. See the following tutorial for an example:
Title | Description |
---|---|
Tutorial: Azure Automation with Event Grid and Microsoft Teams | Create a virtual machine, which sends an event. The event triggers an Automation runbook that tags the virtual machine, and triggers a message that is sent to a Microsoft Teams channel. |
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: Monitor virtual machine changes with Azure Event Grid and Logic Apps | A logic app monitors changes to a virtual machine and sends emails about those changes. |
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. |
{
"properties":
{
"destination":
{
"endpointType": "WebHook",
"properties":
{
"endpointUrl": "<WEB HOOK URL>",
"maxEventsPerBatch": 1,
"preferredBatchSizeInKilobytes": 64
}
},
"eventDeliverySchema": "EventGridSchema"
}
}
See the Event handlers article for a list of supported event handlers.