Forums

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

Webhook automation

Amali December 12, 2023

Hey community, 

My usecase is, when an issue in JSM instance A is updated, it needs to update in JSM instance B as well. I'm not able to figure out how to achieve this. I was able to create issues though. I appreciate all the support. I looked up many articles around but I couldn't wrap my head around it so far. 

Kind regards,

Amalishiya.

1 answer

0 votes
Gabriel Rodrigues January 9, 2024

Hi @Amali,

If you're creating issues issues in instance B when issues are created in instance A, you likely set up automation in instance B with a webhook trigger to achieve this. To enable further updates on a 'cloned' issue in instance B whenever the original issue in instance A undergoes changes, follow these steps:

  1. Create a field named "Original Issue Key" as a "Short text (plain text only)" field in instance B. This field will be used to store the original issue key from instance A within the issues created by the automation. Add the field to the appropriate screens so they're available in the cloned issues.
  2. Modify the automation that creates the issue in instance B to store the original issue key from instance A in "Original Issue Key" field within the created issue.
  3. Create another automation in instance B with an "incoming webhook" component as the trigger. Select "No issues from the webhook" in the "Execute this automation rule with option". In this automation, when the incoming webhook triggers, the response body will include an issue key accessible through the smart value {{webhookResponse.key}}, representing the original issue key.
  4. Branch the automation using the JQL condition "Original Issue Key" ~ "{{webhookData.key}}" and edit the issues with the updated fields contained in the webhook response body. You can access the fields using a smart value such as {{webhookData.fields.summary}}.

The new automation in instance B will look like the following image:

Screenshot_99.png

To make this process work:

  1. Copy the webhook URL from instance B.
  2. In instance A, set up an automation to monitor issue changes as the trigger. Then use the 'Send a web request' action to perform an request to the copied automation URL, providing the issue data in Automation format within the web request body.

Feel free to ask any questions if you need further clarification or assistance with these steps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events