<p>You can register additional filters.</p>
<p>See the documentation - <a href="https://github.com/craftcms/webhooks#filtering-events" rel="nofollow noreferrer">https://github.com/craftcms/webhooks#filtering-events</a></p>
<p>The example shows you how to add a filter based on the entry's type as you need.</p>

CC BY-SA 4.0
2020-11-20T14:59:26.627Z
2020-11-20T14:59:26.627Z
Oli
<p>Using the Webhooks Plug-in, I'm looking to specify a "scope" (or filter) for content type (or section) when using the <code>saveEntry</code> event.</p>

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

<p>My config for my webhook is:</p>

<p><code>Sender Class</code> = <code>craft\elements\Entry</code></p>

<p><code>Event Name</code> = <code>afterSave</code></p>

<p><code>Filter</code> = <code>Element is new: ON</code></p>

<p>Filter options provided allow to filter out new entries, but not entry type.</p>

<p>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.</p>

CC BY-SA 4.0
2020-11-12T17:12:33.067Z
Did you ever find a solution for this Adrian? I have exactly the same question.
GazCrane
CC BY-SA 4.0
2020-11-20T20:27:52.103Z
Here's how you can do it: https://github.com/craftcms/webhooks#filtering-events
Joan
<craft3><plugin-webhooks>
Webhooks: Filter Entry by type (or Section)
# Webhooks: Filter Entry by type (or Section)

(Asked by: username_0 on 2019-09-02)

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.

**Tags:** craft3, plugin-webhooks

> **Comments:**
> **username_1**: Did you ever find a solution for this username_0? I have exactly the same question.  
> **username_2**: Here's how you can do it: https://github.com/craftcms/webhooks#filtering-events  

---

## 1 answers

### Answer by username_3 on 2020-11-20. Score: 1

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.


---

