The Webhook will work globally but you can filter it out to work only for specific content type from Request data using ctx.request.body.model will return the model name from where you have performed any action in the Strapi admin.
Eg: If you want your webhook to work only for Page content type
function webhook(ctx) {
if(ctx.request.body.model === 'page') {
// You logic
}
}
Hi Shehkhar thanks for the reply.
I am aware of this and have already mentioned in my question.
I am asking for some webhooks for example like Stripe payment systems in which you can specify in a granular way:
notify me about entity:update,publish,delete of type Page only.
That means that Strapi send event to this particular webhook only for the conditions above and not all the updates.
Or you can combine different combinations like: entity:update for Page, entity:delete for Category etc so to be able to customise while creating the webhook
The last point of yours is a good idea but I am not sure about customizing webhook creation for different combinations like you said. Currently the webooks in strapi only supports event trigger.