Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Use custom fields in webhook automation?

I'm trying to set up a Service Desk request that can create a new project in Jira.

I've written a REST API that can create projects, based on the following curl command:

curl -X POST jira-server:5000/create-project --data-raw '{"project_key": "FOO", "project_name": "My Kanban Project", "project_type": "kanban", "project_lead": "my_name"}' --header 'Content-Type: application/json'

I've created a Request Type that uses Summary and Description for the Project name and Key, and the reporter name for the project lead.

I've also created a custom radio button field called "Jira Project Type", with option values "Kanban" and "Scrum". 

So my webhook looks like this....

{ "project_key": "${issue.description}", 
"project_name": "${issue.summary}",
"project_type": "${???}",
"project_lead": "${}"

But obviously "${???}" is where I'm stuck.... how do I refer to the value of my custom field?

2 answers

One workaround I have managed to implement involves querying the value of the custom field in the "if" part of the automation rule, and then directing to either of 2 webhook actions where the custom field value ("kanban" or "scrum") is then hard-coded.

But this would quickly become ugly for more complex automations, so if there's a way to reference the custom field in the webhook payload, I'd still like to know.

Hi Richard, I am trying to do something similar.  Did you ever find a solution?

So, I found the answer to this in Jira Service Desk Cloud anyways.  Not sure if it applies to your situation.  Use a custom data section like this:

  "extra_vars": {
    "awx_region": "{{issue.customfield_10050.value}}",
    "awx_vmname": "{{issue.customfield_10051}}",
    "awx_allowed_ssh_ips": "{{issue.customfield_10052}}",
    "awx_publickey": "{{issue.customfield_10055}}"

This pulled data from custom fields, including those with drop down options where you needed to return the value selected.  Hope this helps!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

133 views 0 4
Read article

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