Using Sitecore Webhooks to Automate Processes on Item Publish
Real-time content sync using Sitecore webhooks for item publishing
Start typing to search...
Sitecore Webhooks provide a powerful way to integrate Sitecore CMS with external systems in real time, enabling seamless workflow automation and content synchronization. They act as event-driven notifications that send an HTTP request (usually a POST request) to a predefined endpoint when an event occurs.
These webhooks are mostly useful for:
Automating processes based on Sitecore actions
With Sitecore Webhooks for content publishing, organizations can streamline headless CMS workflows, enhance system interoperability, and improve digital experience management.
Two of the three webhooks primarily focus on workflow actions, while the third is centered around Sitecore events.
This is your basic "notify me when something happens" webhook. For instance, imagine you want to know every time someone creates a new webpage. Simply set up an event handler webhook, and you'll get an HTTP POST notification whenever that occurs.
This type focuses on workflow state changes. If you want to notify your marketing team when content moves to the "approved" state, a webhook submit action has got you covered.
This webhook type acts as a gatekeeper, allowing external services to approve or reject workflow state changes. Imagine integrating with a compliance checking service that must approve content before publication – that's exactly what validation actions enable.
In this blog, we’ll focus on the Webhook Event Handler, specifically for the Publish Item Event and how to set it up in Sitecore.
To configure webhooks in Sitecore:

item:published for the publish event).

Set the Serialization Type as either JSON/XML. Here I have selected JSON as my payload serialization.
Save and publish the webhook.


The item:published event is one of the most commonly used triggers in Sitecore webhooks. It fires whenever an item is published, making it useful for:
When a Sitecore item is published, the webhook will send a payload to the configured endpoint. A typical webhook payload for Item Publish looks like as in the below JSON.
It’s important to note that the payload varies for different events. In the case of the item:published event, the key field is RootItemId (as opposed to ItemId in other item-related events). This is crucial for correctly handling the payload.
{
"EventName": "publish:end",
"PublisherOptions": {
"CompareRevisions": true,
"Deep": false,
"FromDate": "2023-03-10T19:58:10.98Z",
"Mode": "SingleItem",
"PublishDate": "2025-01-20T20:52:42.453Z",
"PublishingTargets": [
"{8E080626-DDC3-4EF4-A1D1-F0BE4A200254}"
],
"RepublishAll": false,
"RecoveryId": "70b7e8dc-0794-4c15-a787-3c6e16c6d977",
"SourceDatabaseName": "master",
"TargetDatabaseName": "experienceedge",
"RootItemId": "c30bf38d-4417-4353-a492-78bea288c46f",
"UserName": "sitecore\\[email protected]",
"WillBeQueued": true,
"Languages": [
"en"
]
},
"WebhookItemId": "985853a8-fd16-4a06-bb8d-ecafd9dae81f",
"WebhookItemName": "Webhook Event Handler"
}
Now we have got the item ID and other details of the publish. So this information maybe used to notify external applications. In our case we use it to get these items into the Coveo index.
Webhooks offer a simpler and more efficient approach to handling events and integrating with external systems, reducing the need for complex custom development. Their easy setup and flexibility make them an essential tool for automating event-driven tasks and improving development workflows. The item:published event is particularly useful, providing key publishing information that can be leveraged for tasks like Coveo indexing.
It’s a simple way to make Sitecore work smarter!
Thanks for reading!