Sitecore Webhook Customize JSON

Created: 3 Feb 2023, last update: 9 Nov 2024

Sitecore webhooks and how to extend it with custom events and format the json in the desired form

Within Sitecore XM Cloud and Sitecore 10.3, there is a new webhook functionality that allows notifications to be sent in the form of an HTTP post to a configured URL about workflow events.

Send a webhook to Microsoft Teams The simplest JSON webhook request to Teams is {‘text':'Hello World’}. A string JSON field is given the default name "String". For example, a Teams message requires the field 'text'. One way to achieve this is to use an external webhook relay service. Another way is to use Newtonsoft.Json and create a custom event, this will give you control over what data the webhook should contain and control over the naming with JSON formatting. To get a String JSON value with a specific name, you can create a JSON converter that presents an object as a string.