Webhooks
With the introduction of Umbraco v13 you can now configure webhooks to trigger on events (such as content published, or media item saved) inside your Umbraco site.
uSync also supports webhooks in Umbraco v13 and when enabled it allows you to hook of specific uSync events using the Umbraco Webhooks UI.
uSync Webhook Events​
There are two categories of webhooks generated by uSync:
Bulk Events​
- uSync Imported Completed
- uSync Export Completed
Bulk events file at the end of the uSync process, when all items have been either imported or exported.
Item Events​
- uSync Item Imported
- uSync Item Exported
Item events fire after each single item is either imported or exported.
Enabling uSync webhooks​
uSync webhooks are not enabled by default, but can be by adding
builder.AdduSyncWebhooks()
to either your site's program.cs
file or inside a custom composer.
[ComposeAfter(typeof(uSyncBackOfficeComposer))]
public class MyWebhooksComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.AdduSyncWebhooks();
}
}