Automating Custom Field Updates with Webhook Data in Jira

Neville April 17, 2024

I’m working on setting up an automation in Jira that involves updating a custom field based on incoming webhook data. The webhook payload includes a list of Vendor IDs in the following format:

{{webhookData.fields.Vendor_ID}}

The values are a series of letters like A, B, C, D.

In Jira, I’ve created a custom field within an Epic, which is a multiple selection box containing the same set of values (A ,B, C, D).

I need to automate the process of matching the webhook’s Vendor ID data with the multiple selection box values and update the selection accordingly.

Could anyone guide me on how to achieve this match and update the custom field using Jira automation?

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
April 18, 2024

Hi @Neville 

If the values are the same between the input and the multiple-select custom field, you may do this with list iteration and advanced edit with JSON.

The challenge for a scenario like this is in the details: your webhook data must be correctly parsed to create the JSON message.  Based on what you described that might look like this, substituting in your custom field's id:

{
"fields" : {
"customfield_12345" : [
{{#webhookData.fields}}
{ "value": "{{Vendor_ID}}" } {{^last}, {{/}}
{{/}}
]

}
}

You will probably want a condition before the issue edit to confirm there are any Vendor_ID values in the webhookData.

Here are some references to help:

Kind regards,
Bill

Neville April 18, 2024

Thanks

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events