Walkthrough: Creating and configuring a webhook event handler
You can create a webhook event handler to inform you when an event occurs.
This walkthrough describes how to:
-
Create a webhook event handler.
-
Configure a webhook event handler.
Create a webhook event handler
To create a webhook event handler:
-
In the content tree, navigate to the /sitecore/System/Webhooks folder.
-
Right-click Webhooks, then click Insert, Webhook Event Handler.
-
In the Message dialog, enter a name for the webhook, then click OK.
Configure a webhook event handler
When you create a webhook event handler, you must configure its fields to choose the events that trigger requests, the items that trigger requests, and where to send the requests.
You can configure a webhook event handler from the content area of the webhook item.
To configure a webhook event handler:
-
In the content area of the webhook, in the Information section, in the Description field, enter a description for the webhook.
-
In the Data section, in the Events field, in the Event Types folder, double-click the events you want to trigger requests.
-
To add rules using the Rule Set Editor, in the Rule field, click Edit rule.
NoteYou can specify the items that trigger requests by adding rules. If you do not add any rules, an event from any item sends a request. We highly recommend that you add rules to avoid performance degradation caused by sending a large number of requests.
You can't set any Rule for Publish events.
-
To enable the webhook, select the Enabled check box.
-
In the Url field, enter the endpoint URL for the requests.
-
Optionally, if the destination endpoint requires authentication, in the Authorization drop-down menu, click the authorization item you want to use.
If the appropriate authorization item is not available, you can create a new authorization item.
-
In the Serialization Type drop-down menu, click the payload type you want to use for the webhook event handler request.
If you do not choose a serialization type, JSON is selected by default.
-
Click Save.