Using the Webhooks Plug-in, I'm looking to specify a "scope" (or filter) for content type (or section) when using the saveEntry event.

Example: Fire a webhook only when a new entry of specific type (say recipe ) is saved... not any/all new entries.

My config for my webhook is:

Sender Class = craft\elements\Entry

Event Name = afterSave

Filter = Element is new: ON

Filter options provided allow to filter out new entries, but not entry type.

My solution for now is to try and filter the incoming JSON on my endpoint and only trigger when I see the right Entry Type (untested yet), but would be nice to not send JSON on every single new entry to my webhook if I don't have to.


You can register additional filters.

See the documentation - https://github.com/craftcms/webhooks#filtering-events

The example shows you how to add a filter based on the entry's type as you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.