Automation with Webhook links

Easily integrate Smart Templates with Automation for Jira and other third-party tools ⚡️

Contents 👇🏼

Overview

With a Webhook link 🔗, you can trigger issue creation from a template using Jira Automation or third-party tools like Postman. It works with simple templates without variables, and you can also send different types of variables in the request body to enhance your processes even further 🚀.

Steps to Generate a Webhook Link

  1. Open the edit page of the template you want to create a webhook link for.

  2. Navigate to the Automation tab.

  3. Click the Generate webhook button.

Screenshot 2024-08-28 at 19.21.45.png
  1. That’s it! Just click the Copy button to grab the link, then paste it into Jira Automation or any other tool where you want to trigger issue creation from the template.

Triggering the Webhook without request body

☝🏼NOTE: This method is ideal for templates without variables. Not using variables yet? Find more information about them here →

  1. Grab a Webhook link of a template

  2. Execute web request using POST method (no need to add request body) like below in Postman

Screenshot 2024-08-22 at 19.06.49.png

OR

Setup Jira Automation which will trigger issues creation from your template:

  1. Go to your Jira project → Navigate to Project Settings in the left-hand sidebar →
    Select Automation from the options.

  2. Click on Create Rule to start setting up a new automation rule → Choose a Trigger for your rule based on when you want the webhook to be called

  1. After selecting your trigger, click on THEN: Add an Action → Select Send Web Request from the list of actions → In the Webhook URL field, paste the webhook link that you generated for the template

☝🏼NOTE: Use the HTTP POST method and leave the Web Request Body empty. Also, keep the Headers section empty.

  1. Add any additional Conditions or Actions based on your needs (optional)

  2. Give your rule a Name and publish it → click Turn it on to activate the rule.

Triggering the Webhook with request body

When triggering a Webhook, you can customize the issues created by passing variables in the request body using JSON format. Currently, Text Variables are supported, and in the future, additional variable types such as Select List (Single choice), Select List (Multiple choices), and User Picker will be available. More about Variables can be found here → .

  1. Go to the Edit page of the template that has the variables configured

    Example of a Variable:

And the Variable usages:

 

  1. Click the Generate webhook button on the Automation tab → Copy the generated webhook link.

  1. Open your Jira project and go to Project Settings → Select Automation from the sidebar → Click on Create Rule to start a new automation rule → Choose the appropriate Trigger for your automation rule

  2. After setting the trigger, click on THEN: Add an Action → Select Send Web Request as the action → Paste the copied webhook link into the Webhook URL field

  3. Select HTTP Method POST → and pick Custom data in the Web request body field

  1. In the Custom data field, paste the pairs of key : value using JSON format to customize your issues

  1. Give your rule a Name and publish it → click Turn it on to activate the rule.

  2. Check the created issues to confirm that the template has been applied as expected and that the variables have been correctly populated.

{ "Day" : "1st", "Month" : "September", "Year" : "2030" }

Other examples (Jira Smart Values)

Smart Templates allow you to create customizable Jira issues by passing variables through the Webhook body. You can even pass Smart Values as the input for these template variables, enabling dynamic and context-specific issue creation based on real-time data.

  1. Let's look at this template, where only variables have been added to the Summary and Description fields:

  1. Your Webhook request body can include Smart Values that extract the Summary and Description from the source task and pass them as values to the corresponding variables in the template via the webhook body.

  1. See it in JSON format below:

{ "summary" : "Review and Finalize API Documentation: {{issue.summary}}", "description" : "This task is based on the completed documentation task:\n\n*Original Summary:* {{issue.summary}}\n*Original Description:* {{issue.description}}\n\n*Action Required:*\n- Review the completed documentation.\n- Ensure all necessary details are included and correct.\n- Finalize and prepare for release.\n\n*Reference Task:* {{issue.key}}" }
  1. Next, trigger the Automation rule for the task:

  1. Here’s the result we get: