It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira cloud Webhook not fired

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

0 votes
Answer accepted

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.  

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.

Is this matter solved.  I have same problem

 

Regards.!

Ramona Chappel

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?

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

 

That works fine.

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.

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.

"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?

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?

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

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?

0 votes

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you