Forums

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

Using smart values of incoming webhook with Jira Automation

Incoming webhook is an incredibly useful method for triggering automation either from another automation—allowing you to control the order in which multiple automations run—or from external applications. Additionally, you can include data in the request that can be accessed in the automation via {{webhookData}}.

The format of the payload can vary depending on the source of the request. If you are sending the request through another automation, you have three options for the payload:

Send web request.png

In most instances, you would use Custom data, allowing you to send only the necessary payload for the automation, structured like this:

{  
"user": "Charlie",

"software": "{{issue.customfield_12345}}",
"role": "developer"
}

Let’s explore an example.

When you first create an automation, the incoming URL will not be generated until you have enabled or saved it.

Initiate incoming webhook automation.png

Once enabled/saved, you will notice two key features on the trigger it has a unique URL and a secret that can be used to initiate the automation.

Saved webhook automation.png

 

Now that we have the initial automation set up, let’s examine what we can do with the payload.

The first step I recommend is ensuring that the URL includes the work item key. In this example, it is part of the URL: https://api-private.atlassian.com/automation/…?issue={{issue.key}} (you can also include the key as part of the payload like this {"issues":["TEST-1"], "data": {"releaseVersion":"5.3.2"}}). Additionally, you can verify that the payload is included by adding a condition or using the Log action option.

Initial checks.png

What if you have a more complex payload or are using one of the issue data payloads? How do you extract values nested deeper within the JSON structure? {{webhookData}} employs dot notation to access properties, such as {{webhookData.someValue.childValue}}.

Consider a payload structured like this:

{
"user": "Charlie",
"software": {
"app": "Confluence",
"space": "IT",
"role": "admin"
},
"memberId": "123456"
}

To retrieve the space from the above payload, the smart value would appear as follows:

dot notation.png

Putting everything together, here is the completed automation. In this scenario, this automation could be triggered from an onboarding automation that, based on the information in that ticket, calls other automations to create different tasks. For example, it could prompt the agent to add the user to the specified space in the payload.

final.png

But how do you call the automation from another automation or an external application, especially since the call now needs to include the secret?

You accomplish this by using the X-Automation-Webhook-Token header, like this:

Web request w secret.png

This example shows how you can utilize smart values from the incoming webhook in Jira automation. Another potential use case could involve assigning the assignee based on the on-call schedule in JSM Operations or creating dynamic looping in automation

2 comments

__ Jimi Wikman
Community Champion
May 5, 2025

Great article @Mikael Sandberg !

Benjamin Horst
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.
May 6, 2025

Thanks a lot. Descriptive and easily understandable. The Incoming Webhook increases the options of Automations with those cascading Webhooks a lot. Never thought about using it like that. But maybe this will save me some tricky workaround-scripting in the future :).

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events