Forums

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

webhooks / https://api-private.atlassian.com/automation/webhooks/jira/a/ Does not work

Christophe Le Coent ELCA May 9, 2025

I am just testing webhooks between 2 instances of JIRA Cloud - jirasource.atlassian.net and jiradestination.atlassian.net. On JIRA Destination, the webhook url given to me is "https://api-private.atlassian.com/automation/webhooks/jira/a/95xxxx-xxxx" and a secret key which I am passing both to jirasource webhook URL and Secret. 

When I create a item in jirasource, nothing happens in jiradestination. 

I have tested with curl and it works. So I am assuming the problem is in the way I have configured the jirasource... But the way I did it it just copy/paste of webhook url and secret into the webhook. 

It does not work.. I cannot receive a webhook triggered from JIRA it seems. 

2 answers

0 votes
Piyush Annadate _ACE Pune_
Community Champion
May 9, 2025

Hello @Christophe Le Coent ELCA ,
Welcome to the Community !
With curl, try to check as curl -v parameter to know what all request and response header were; later match that with your automation headers.

Christophe Le Coent ELCA May 10, 2025

Thanks Piyush for your replay. No issue with curl commands. In the JIRA webhook, I copied the url I am given by my automation starting with https://api-private.atlassian.com/automation/webhooks/jira/a/ and I add the secret key. See picture:whk.png

Piyush Annadate _ACE Pune_
Community Champion
May 10, 2025

Will try that, eventually, you are enable to HIT these incoming webhook in another instance?

Christophe Le Coent ELCA May 11, 2025 edited

Hi Piyush, this script works, it hits it - it is only from JIRA that it does not work it seems.

$timestamp = Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ"

$json = @"
{
"event": "issue_updated",
"issue": {
"key": "TEST-1234",
"fields": {
"summary": "Test Webhook from curl",
"project": { "key": "KAN" }
}
},
"timestamp": "$timestamp"
}
"@

# Save to file
$json | Out-File -Encoding UTF8 -FilePath "body.json"

# Call curl with JSON from file
curl.exe -v `
-H "Content-Type: application/json" `
-H "X-Automation-Webhook-Token: MY_SECRET" `
-d "@body.json" `
"https://api-private.atlassian.com/automation/webhooks/jira/a/MY_URL"

0 votes
Mikael Sandberg
Community Champion
May 9, 2025 edited

Hi @Christophe Le Coent ELCA ,

Welcome to Atlassian Community!

I assume that you are using the X-Automation-Webhook-Token header to send the secret, correct? If you look at the audit log for the automation, does it indicate that the web request happened? Have you tried and checked the checkbox to delay the execution of automation until you get a reply back? What happens if you validate your web request configuration?

Christophe Le Coent ELCA May 10, 2025

Thanks Michael for your reply: I have created a webhook from JIRA but how do I add this X-Automation-Webhook-Token header?  I can create a ticket using a script but that is outisde JIRA. Curl commands work. What does not work is creating the webhook from JIRA to trigger a incoming webhook on the "destination" JIRA (knowing that everything works with webhooksite.com) - Below how I am creating my webhook in JIRA. whk.png

Christophe Le Coent ELCA May 11, 2025

with a script, url and secret, it works. From JIRA: KO.

Bartosz Wozniak May 21, 2025

Hi @Christophe Le Coent ELCA 

Have you figured out? I have the same issue calling a webhook (data taken from automation) from workflow (same instance). I did the same steps as you.

Christophe Le Coent ELCA May 23, 2025

@Bartosz Wozniak : no, still a problem on my side. 

Bartosz Wozniak May 23, 2025 edited

@Christophe Le Coent ELCA I made it work

Read here: https://support.atlassian.com/cloud-automation/docs/configure-the-incoming-webhook-trigger-in-atlassian-automation/ 

Starting with: "If your application does not support custom HTTP headers, you can instead insert a slash at the end of the URL and add the secret after this."

Christophe Le Coent ELCA May 23, 2025

Yes I did read it: my application is... JIRA. This is between 2 JIRA clouds. so if JIRA does not support custom HTTP headers, what do I do in step 7 ?

Bartosz Wozniak May 23, 2025

I got the same. I'm triggering automation webhook from Jira workflow. I adjusted internal webhook using URL/SECRET?issue=${issue.key} and it started to work.

The secret field left blank (it's for other reasons).

Christophe Le Coent ELCA May 23, 2025

Good news - do you have a screeshot to show how to you did "webhook using URL/SECRET?issue=${issue.key}"? where did you put that?

Thanks in advance !

Christophe Le Coent ELCA May 26, 2025

@Bartosz Wozniak Hello Bartosz, where did you add URL/SECRET?issue=${issue.key}" ?

Bartosz Wozniak May 26, 2025

@Christophe Le Coent ELCA 

System settings -> Webhooks -> URL

Then I'm using this webhook in workflow's action "Trigger webhook". But in general, you can use this url schema everywhere you can't set url headers (for setting the secret). Then just pass secret as a part of webhook's url.

Christophe Le Coent ELCA May 26, 2025

Do you mean I should add secret and issue to the url such as: 

https://api-private.atlassian.com/automation/webhooks/jira/a/956edc0a-438b-url-url-url-24c3249f41d/0196b57e-b07d-7cd8-896c-2c6f63dcd819/c799be80-secretkey-8b1bdd2a5?issue=${issue.key}

?

 

 

Bartosz Wozniak May 26, 2025

I don't know how and where you are triggering webhook. In my case, the difference between new and old implementation was to update url address and add /secretKey at the end. I user ?issue=${issue.key} already, so I didn't have to add it.

If you are not using ?issue you don;t have to add it. 

Simply, just test new URL with the secret with Postman using simple POST request.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events