Jira cloud Webhook not fired

George Yildiz June 15, 2018

Hi, I am trying to setup webhooks to that my azure functions are executed. At the moment I do not care what the event is, I just want the webhook to fire. For this reason I have checked all the events. I have posted a screenshot of the setup in the webhook. We are using the Cloud version of Jira so I am not sure how to debug. I have tried to create an issue, delete, add worklog etc but nothing seems to fire the webhook because there is no activity in the Azure function.

I have tested to paste the URL in the browser and I get a response and the azure function is triggered.


Is there a way to see a log or something similar? 

Thanks in advance.


jira setup.png

4 answers

1 accepted

1 vote
Answer accepted
George Yildiz June 15, 2018

This --- > 

https://community.atlassian.com/t5/Jira-questions/Jira-Webhooks-not-firing/qaq-p/785220

Apparently the url can not be too long in jira.. I solved it with a proxy in Azure function.  

Nathan Given July 17, 2019

You may also be able to solve it by generating a different function or host key

 

Go to your Azure Function in portal.azure.com > Manage > Function Keys (or Host Keys) > Add new Function/host key > manually type in a shorter key.

1 vote
Ramona Chappel December 17, 2019

Is this matter solved.  I have same problem

 

Regards.!

Ramona Chappel

0 votes
Claudiu Lionte
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2018

Hi George,

If you want to test the firing of the webhooks in Jira, you can always use a test tool like webhook.site or similar. Just make sure you delete the webhook from Jira when you're done with the investigation. Otherwise, this poses a security risk as you'll be sending data to third parties (although encrypted).

Claudiu

0 votes
P_D_ Foerster
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.
June 15, 2018

Hi George,
have you already tried to manually trigger your Azure function by using a REST client or curl with the URL you entered in the webhook?

George Yildiz June 15, 2018

I have tried to do a GET request through postman with the url that I entered in the webhook setup. 

 

That works fine.

P_D_ Foerster
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.
June 15, 2018

As far as I know if a webhook is triggered, the corresponding request is sent with POST, not with GET because the webhook transfers data to the target system (payload).

From the documentation (https://confluence.atlassian.com/adminjiracloud/managing-webhooks-776636231.html)

Webhooks are user-defined HTTP POST callbacks.

Please also refer to https://developer.atlassian.com/cloud/jira/platform/webhooks/ for more information on configuring and using webhooks.

George Yildiz June 15, 2018

I have also tried with a POST which works fine from postman. I have followed the guide in the second link you posted. What I did skip is the part about:

"Add a webhook as a post function to a workflow", from my understanding this is not necessary.

 

What is weird for me is that the azure function is not logging any activity at all about incoming requests when I try to create a new issue for an exisiting project, add logging for time (worklog) or make a comment.

P_D_ Foerster
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.
June 15, 2018

"Add a webhook as a post function to a workflow", from my understanding this is not necessary.

This is only required, if the webhook should be triggered as part of a workflow action. In your case you can ignore that :)

I am not familiar with Azure but maybe Azure / the firewall is blocking these requests so that they never get through in the first place?

George Yildiz June 15, 2018

I found a solution that i posted as a new answer. Thanks for the help though. If the problem is because of long URLs in Jira maybe this is something that should be mentioned or fixed?

P_D_ Foerster
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.
June 15, 2018

You're welcome :)

Yes, definitely. In my opinion there should be a warning / an error when saving the webhook configuration if it contains an URL with too many characters.

Like # people like this
Jan Wilson March 11, 2020

I agree on having a warning.

Additionally, does anyone know what the maximum length can be in order to ensure that the webhook can be fired?

Suggest an answer

Log in or Sign up to answer