Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Webhook on user added to group

Jairo Cabello January 30, 2019

Hello!

I'm trying to figure out how to launch a Webhook in jira when any user is added to a particular group, the idea is the following:

I have a script that every time it runs, it takes all the users in group X and it add them as "Default reviewers" in some repositories in bitbucket. I would love to automatize this so every time a new colleague joins the group the scripts gets automatized.

If I could launch a webhook on the event of a user added to a group, this would be so easily achievable! But I'm not quite sure how. First I thought of creating a custom listener using ScriptRunner, but even if I can catch the event, I don't know how to get the webhook out of it.

Ideas are very welcome!

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2019

Hello,

You can not write such a webhook out of the box. You would need a scripting plugin, which can catch this event and then you should send a rest call in this event listener.

Jairo Cabello February 1, 2019

Hello!

Thanks, I already realized this.

At the end I believe I will be able to get this right by setting up a custom listener on scriptrunner and using the GroupMembershipsCreatedEvent to listen for a user added to a group. Then, I will write a rest client in groovy to send a POST to whatever serverless platform I want.

Suggest an answer

Log in or Sign up to answer