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

Can I send a webhook to JIRA with Automation for JIRA?

Andreas Knecht Community Leader Sep 19, 2016

I would like to write a simple script that sends a HTTP POST with some extra data (like a version I'm releasing) to JIRA and get JIRA to update some issues as a result of this. Is this possible with Automation for JIRA?

1 answer

1 accepted

0 votes
Answer accepted
Andreas Knecht Community Leader Sep 19, 2016

One of the many rule components Automation for JIRA offers is the "Incoming webhook trigger":

Project automation - Code Barrel JIRA 2016-09-20 14-01-17.png

An incoming webhook provides a unique URL that anyone can send a HTTP POST to.  No extra authentication is required.  In case the URL ever gets sent to someone that shouldn't have it, it's trivial to generate a new URL, or you can simple disable the automation rule to stop the wrong people from executing your rule.

When you configure an incoming webhook, you can set it up to run a JQL search to find issues, or they can also be provided in the POST body.  The trigger provides a detailed example using curl on how to do this.

In the example above, we search for issues in a "Waiting for Deployment" status.

We can then access additional data that was sent in the HTTP POST body in any field that supports smart-values using the webhookData object.  For example you could use this CURL command to POST a 'releaseVersion' for the trigger above:

curl -X POST -H 'Content-type: application/json' \
 --data '{"data": {"releaseVersion":"5.3.2"}}' \
 https://automation.codebarrel.io/pro/hooks/9b49ead1assshhsecretc2d

This would then add a comment with "Issue released as 5.3.2" to any issue matching the JQL and set their status to "Done".

Incoming webhooks are incredibly useful when you're writing a quick script and want to interact with JIRA and perform some complex operations on a set of issues.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Marketplace Apps & Integrations

Demo Den Ep. 4: Continuous Integration with CircleCI & Jira Software

Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...

451 views 0 4
Join discussion

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