Create Your Own Jira Server Bot Integrated with Webex
This article explains how you can create your own Webex-integrated Jira Server bot.
anchorPrerequisites
anchorBefore continuing, you will need access to a few developer resources and the Node.js framework:
- Jira Account: You'll need Jira account: https://developer.webex.com/.
- Cisco Webex Account: You'll need a Webex developer account if you don’t have one already. You can create one on the Webex Developer Portal.
- Node.js: To create the Webex bot, you’ll be leveraging the Webex Node Bot framework. Make sure you’ve got Node.js installed on your platform of choice.
anchorBuild the Bot
anchorBefore Jira Server non-admin users can use your bot, you need an authentication process in your bot to communicate with Jira. For this you will need to create an application link in Jira. You must complete the steps below using your Jira administrator account.
For additional information, refer to this link for OAuth authentication steps https://developer.atlassian.com/cloud/jira/software/scopes-for-oauth-2-3LO-and-forge-apps/ as well as atlassian-oauth-examples repository to learn how to create an OAuth client.
- Note down the Jira Server base URL required following steps:
If your Jira Server account URL is
https://sample.acme.com
, for example, thensample.acme.com
is the base URL. - Sign in to your Jira Server account as an administrator:https://id.atlassian.com/login.
- Select the Settings icon and then choose Applications:
- In the left pane, under Applications select Application links.
- Enter any URL of your choice into the input field and then select Create new link. The actual URL doesn’t matter because it's only retrieving data from Jira.
- On the first screen in Link applications, enter the following details:
- Application name: Enter a name for your application.
- Application type: Select Generic Application.
- Service Provider Name: Enter anything.
- Consumer key: Enter anything.
- Shared Secret: Generate a private key using: https://docs.openssl.org/master/.
- Request Token URL: Use
<base URL from step 1>/plugins/servlet/oauth/request-token
. - Access Token URL: Use
<base URL from step 1>plugins/servlet/oauth/access-token
. - Authorize URL: Use
<base URL from step 1>plugins/servlet/oauth/authorize
.
- In the next screen, enter the consumer details for the client:
- Consumer key: Enter the same value from the previous screen.
- Consumer name: Enter the same value from the previous screen.
- Public key: Generate a public key using: https://docs.openssl.org/master/.
- Select Continue. The client is now configured as an OAuth consumer in Jira.
- Log in to Webex for Developers.
- Create your Webex bot at: https://developer.webex.com/my-apps/new/bot.
- Note down the bot's access token, which you'll use to make API requests.
anchorUse the Webex Node Bot Framework
anchorTo simplify the creation of your bot, you can use the Webex Node Bot Framework available on GitHub. This framework provides a robust and easy to use platform for handling bot interactions:
For any queries related to bot framework you can join the following Webex space: Webex-Node-Bot-Framework Support.
anchorAdditional Resources
anchorFor more information on Jira and Webex, see:
- Jira Documentation: https://developer.atlassian.com/cloud/
- Webex API Documentation: https://developer.webex.com/docs