Share

Create a Jira Webhook (macOS)

To create a Webhook in Jira, from the Settings menu select System.

Go to Systems settings

In the left-hand menu, under ADVANCED, select Webhooks.

Go to the Webhooks menu

From the Webhooks page, select the Create a Webhook button in the top right-hand corner of the page.

Create a Webhook

Fill in the information for the Webhook as follows:

Field Example Notes
Name Flow Production Tracking Jira Bridge If you plan on having multiple projects, identify the webhook’s name with the project it will be used for
URL https://<url_for_sg_jira_bridge>/jira2sg/default/issue/${issue.key} <url_for_sg_jira_bridge> is the host name or IP address of the system you will launch webapp.py or service.py from – see more on URL below
Description Webhook that syncs Jira data with Flow Production Tracking using the Flow Production Tracking Jira Bridge
JQL project = "Your Project Name" "Your Project Name" refers to your Jira Project. This field will autofill as you begin filling it in.
Events [x] Issue: created, updated, deleted, [x] Comment: created, updated, deleted

Webhook URL

For the webhook URL, you can use the IP address of the system from which you will launch webapp.py or service.py from.

In this guide, we are testing the Flow Production Tracking Jira Bridge from a local system. If you are testing on a machine not accessible to Jira, ie. testing locally, it's likely your machine isn't accessible from the Jira server, especially if you're using a Jira cloud server. To allow the Jira server to securely access your local machine for testing and development, you can use ngrok. Instructions to set up ngrok are included below.

Find your IP address

Find your IP address

To find your IP address, open a macOS Terminal by typing Command + Space Bar, typing the word Terminal, and hitting Return.

Open a new Terminal window

The Terminal will now be open.

The Terminal is now open

Enter the following command into the Terminal.

curl ifconfig.me

The Terminal will now display 4 sets of numbers, separated by a period. This is your IP address. In the example below, the IP address is: 12.34.56.789

See your IP address

Installing ngrok for macOS

Set up ngrok for local testing

Install Homebrew

Developers use Homebrew to install various software packages on a Mac. Homebrew creates executables and installs them into a predictable location for your computer to execute later.

To install Homebrew, open a macOS Terminal by typing Command + Space Bar, typing the word Terminal, and hitting Return.

Open a new Terminal window

The Terminal will now be open.

The Terminal is now open

Enter the following command into the Terminal.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Enter the command

Hit Return. You will now be prompted for your macOS password. Type the password.

Note:

Your password will not be displayed as you type! Type carefully. If you type your password in wrong, you will be prompted to try again.

Input your password

After typing in your password, hit Return.

Hit RETURN to install Homebrew

When prompted, hit Return to continue.

When prompted, enter your password

You will now be prompted to enter your macOS password again. Enter your password and hit Return.

Enter your password

Wait several minutes. Once the download and install is complete, additional text will appear in the Terminal indicating that installation has been successful.

Installation of Homebrew is complete

Homebrew is now installed.

Install ngrok

To install ngrok, open a Terminal and enter the following command.

brew install ngrok/ngrok/ngrok

Allow a minute or two for ngrok to be installed. Once installed, go to https://ngrok.com and sign up for a free account.

Once signed in, under Cloud Edge on the left-hand menu, select Domains.

Sign into ngrok and go to Domains

Next, select + Create Domain.

Create a new Domain

ngrok allows users one static domain for free. The URL will be randomly generated.

Generate your ngrok URL

You can view your free domain anytime through ngrok's website.

See your domains

With your domain created, find Your Authtoken on the left-hand menu.

Get your Authoken

To authenticate your ngrok agent, enter the following command into the Terminal, replacing ReplaceThisWithYourAuthtoken with your token, or by copying the command from the ngrok website.

ngrok config add-authtoken ReplaceThisWithYourAuthtoken

To start ngrok, enter the following command into the Terminal, replacing the URL with the static URL you received from ngrok.

ngrok http domain=quail-welcome-grub.ngrok-free.app 80

You should now see something that looks like this:

See your Authtoken

The static URL is what the Jira Webhook will start with.

If working locally, instead of a URL like this:

https://localhost:9090/jira2sg/default/issue/${issue.key}

You will use a URL like this instead:

https://quail-welcome-grub.ngrok-free.app/jira2sg/default/issue/${issue.key}
Note:

If using ngrok, add the URL to line 33 of the Flow Production Tracking Jira Bridge Credentials Cheat Sheet.


Create Webhook

Select Create at the bottom of the page to create the Webhook.

Create a Webhook in Jira

Note:

Add the Webhook Name, URL, Description and JQL to lines 32, 33, 34 and 35 of the Flow Production Tracking Jira Bridge Credentials Cheat Sheet.

If you customize the settings name used for the syncer on the bridge, then make certain to update the "default" in the URL to the settings name used for the syncer.


Was this information helpful?