# Webhook triggered groups on flags

**URL:** https://meta.discourse.org/t/webhook-triggered-groups-on-flags/90361
**Category:** Support
**Created:** [June 20, 2018, 11:58pm UTC](https://meta.discourse.org/t/webhook-triggered-groups-on-flags/90361 "2018-06-20T23:58:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sarahann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sarahann/32/96703_2.png) [@sarahann](https://meta.discourse.org/u/sarahann)
#### Post date: [June 20, 2018, 11:58pm UTC](https://meta.discourse.org/t/webhook-triggered-groups-on-flags/90361/1 "2018-06-20T23:58:33Z")

</div>

**Prerequisites** :

1. Have a group with some users in it (mine is called ‘forum-mods’ and has trust level 4 users in it)

**Steps**

1. In the /admin/api/web\_hooks panel, create a webhook with the following settings  

2. Login as one of the users that is part of your group (ie. 'forum-mods). Or impersonate them

3. Flag a regular user’s post as inapropiate

4. Notice the flag appears in the /admin/flags/active part of the dashboard. But the request doesn’t appear in /admin/api/web\_hooks/[webhook id]/events

**Expected Behavior**  
See a webhook event get fired for a user in the ‘forum-mod’ group flagging another user’s post.

Possibly this is me misunderstanding the proper usage of the “Triggered Groups” setting in my webhook. The wording is a bit confusing for me “webhooks will only be triggered if the event is ‘related’ with specific groups”  
 ![image](https://global.discourse-cdn.com/meta/original/3X/4/1/415b8b2370bea1a4dc5adee3697f299ff2aafc2f.png)  
Not entirely sure about ‘related’, but I’m assuming that a member of the ‘forum-mod’ group should be able to flag another user.

Also, the webhook events work fine when I remove my group from the Triggered Groups field. But I was hoping it would act as a filter because I’m creating a webhook that only cares about forum-mods flagging other users.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 21, 2018, 12:17am UTC](https://meta.discourse.org/t/webhook-triggered-groups-on-flags/90361/2 "2018-06-21T00:17:12Z")

</div>

Not sure, maybe @vinothkannans could clarify?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [June 21, 2018, 5:07am UTC](https://meta.discourse.org/t/webhook-triggered-groups-on-flags/90361/3 "2018-06-21T05:07:44Z")

</div>

Currently flag events are not filterable by groups. So you shouldn’t set ‘Triggered groups’ field for flag event web hooks. If you set it then it won’t fire.

I think either we should respect or mention the applicable types. Also this is happening in few other web hooks too. Currently we display both ‘Triggered categories’ and ‘Triggered groups’ for all type of web hook events. But it only applies to few types.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 21, 2018, 5:24am UTC](https://meta.discourse.org/t/webhook-triggered-groups-on-flags/90361/6 "2018-07-21T05:24:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
