Triggered Groups in User Event Webhook doesn't work

According to this post, Webhook triggered groups on flags, certain events don’t honor the Triggered Groups filter. I’m trying to configure a User Event webhook to get notified whenever a user in a specific group updates their user profile. When I try to use it, I get the following error:

I want to limit this to certain groups for the following reasons:

  • My automation service, Airtable, imposes limits on how many invocations an automation can have. Having this webhook fire on the thousands of users we have could potentially overwhelm the limits. The groups I am targeting only have a fraction of the users.
  • I want to be sure that the events I receive are from groups that I care about. My automation only cares about user profile updates from a specific group. If I can’t filter on groups, then I have to add logic to my automation to filter out anything not from the group.

Is it possible to enable Triggered Groups for the “User Event”?

1 Like

I think you’d need a plugin, and if you were going to do that, you could likely just make a plugin that would do whatever you’re doing with Airtable (unless Airtable is the end, and not the means).

Have you tried creating a group_user_event and setting trigged_groups? There is no group attached to a user, so it’s not expected that groups would have any effect on the User, but UserGroups, that’s what you’re talking about. (I think.)

This is what I tried:

I was hoping that the “User Event” could be filtered based on one or more groups that a user is a part of. In this case, I only care about user events when the user is in the Ambassador group.

You said that you had tried that. I was suggesting that you try something else.

There is no user event for groups.

A group_user event, I am pretty sure, is an event where a user is added or removed from a group, which is what you care about, so try creating a group_user event and the group trigger for the group you care about.

Actually, I want to know when a user profile has been updated, and I only care about those users who are in the Ambassador group. I want to be notified of the following three changes to a user profile:

  • Change of email address
  • Change of username
  • Addition or change to linked GitHub account

I think I can get that from the “User Event”, but being unable to limit that event to a specific group means I could be getting much more notifications than I want.

Oh. Darn. Sorry. I must have read too quickly. Or disjointedly.

I’m afraid you’ll need a plugin.

Here’s one that I wrote long ago. I can’t promise that it works, or is well-written (I know a good deal more about plugins now than I did then!), but it could be a start. I’d start with GitHub - discourse/discourse-plugin-skeleton: Template for Discourse plugins and then add the bits for the webhook from plugin.rb and the serializer.

1 Like

Continuing the discussion from Webhook triggered groups on flags:

There is no plans for that implementation? What the best workaround that core team actually suggest?

I’m looking for exactly the same that OP posted (he reminder me that I’m still need to work on it) :grimacing: