Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Automation Inbound webhook with custom data

Hello, I try to use an inbound webhook to send a custom param and update a custom field in issues. All done right from the url, so far this is the url that I guess should be use but not working at the moment: 

https://mywebhookurl?issue=test1&data[customParam]=customValue

1 answer

0 votes
Andy Heinzer Atlassian Team Apr 15, 2021

Hi Alfredo,

I understand that you are trying to update an issue in Jira Cloud by sending Jira a webhook from another application.

Are you using automation in Jira Cloud to do this?  Because I think this way is easier to setup for changes like this.  More details on this are in https://support.atlassian.com/jira-software-cloud/docs/automation-triggers/#Automationtriggers-Incomingwebhook

It could also be possible to have your incoming webhook hit to a specific REST API endpoint, this is more complex to setup because you then have to manage authentication for the request.

But I think using automation to do this is a better way to set this up.  Automation can also then be used to edit the issue and pass in one of the values from the webhook payload.

Try this and let me know if you run into any problems with this approach.

Andy

I'm using Automation but I have a custom field in my issues and want to pass data that also modify the custom field

Andy Heinzer Atlassian Team Apr 16, 2021

Ah, thanks for clarifying.  While you can specify the issuekey in the URL as a path parameter (such as https://url/endpoint?issue=ABC-456), the problem with your approach here is that the other value that you want to change cannot be passed in the path parameter (as part of the URL itself).  But, you should still be able to pass that as a value in the body of the json payload.

For example, I have a custom number field in my instance called 'number1', and I can call the webhook in a format such as:

curl -X POST -H 'Content-type: application/json' \
"https://automation.atlassian.com/pro/hooks/[redactedId]?issue=SCRUM-13" \
--data '{"data": {"number1":787}}'

In this case, my issuekey is SCRUM-13.  From there you can setup an automation rule to set that field and use the json payload to look for that value.  This would look like this:

Screen Shot 2021-04-16 at 10.42.13 AM.png

This is one way that you can set a custom field value via the webhook.  The limitation here though is that you have to define the custom field that is being updated in the automation rule, and name the specific customfield in the {{webhookData}} object.  In my example I did that with a smart value of {{webhookData.number1}} to set that custom field.  I have not found a clear way yet to define both the custom field and that custom field's value using the automation incoming webhook.

If that aspect is important to you here, say because you want to set lots of different field values at the same time in a single call, then I think the better approach will be to look into calling the REST API with a webhook instead.  The payload will be a bit more complex, and we would have to deal with a means to authenticate here, which can be done, but adds an aspect of security best practices to address.  Most often users that use webhooks to call the REST API will choose Basic auth and use a token to be able to make such calls.

I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

ThinkTilt is joining the Atlassian Family!

This morning, Atlassian announced the acquisition of ThinkTilt , the maker of ProForma, a no-code/low code form builder with 700+ customers worldwide. ThinkTilt helps IT empower any team in their or...

839 views 28 33
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