Webhooks don't indicate document creation, update or deletion. Possible solution found.
{
"transactionId": _rev,
"projectId": sanity::projectId(),
"dataset": sanity::dataset(),
"ids": {
"created": [select(before() == null && after() != null => { _id, _type })],
"deleted": [select(before() != null && after() == null => { _id, _type })],
"updated": [select(before() != null && after() != null => { _id, _type })],
"all": [{ _id, _type }]
}
}https://www.sanity.io/manage/webhooks/share?name=Legacy+webhook&description=Recreat[…]thod=POST&apiVersion=v2021-03-25&includeDrafts=&headers=%7B%7D (via https://www.sanity.io/plugins/sanity-algolia )
Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.