"This page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information: \n",
"- [Introduction to GPT Actions](https://platform.openai.com/docs/actions)\n",
"- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library)\n",
"- [Example of Buliding a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This particular GPT Action provides an overview of how to connect to Jira, Atlassian's tool for project and ticket management. This action assumes a user’s context and allows them to read and write to issues in a given project."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Value + Example Business Use Cases"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Value**: Users can now leverage ChatGPT's natural language capability to connect directly to Jira Cloud\n",
"\n",
"**Example Use Cases**: \n",
"- A user can load up recent issues for a particular project and use ChatGPT to provide solutions\n",
"- A user can create and alter issues and sub-tasks and assign to specific users by instructing ChatGPT"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Application Information"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Application Key Links"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check out these links from the application before you get started:\n",
"Before you get started, make sure you go through the following steps in your application environment:\n",
"- Ensure you have the access and permissions to create an application in the [Atlassian Cloud Developer Console](https://developer.atlassian.com/console/myapps/)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ChatGPT Steps"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Custom GPT Instructions "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": [
"**Context**: you are specialized GPT designed to create and edit issues through API connections to Jira Cloud. This GPT can create, read, and edit project issues based on user instructions.\n",
"\n",
"**Instructions**:\n",
"- When asked to perform a task, use the available actions via the api.atlassian.com API.\n",
"- When asked to create an issue, use the user's input to synthesize a summary and description and file the issue in JIRA.\n",
"- When asked to create a subtask, assume the project key and parent issue key of the currently discussed issue. Clarify with if this context is not available.\n",
"- When asked to assign an issue or task to the user, first use jql to query the current user's profile and use this account as the assignee. \n",
"- Ask for clarification when needed to ensure accuracy and completeness in fulfilling user requests."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### OpenAPI Schema "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*NOTE: Replace the placeholder <CLOUD_ID> in url with your cloud environment's unique ID. You can find this value by visiting https://<YOUR_SUBDOMAIN>.atlassian.net/_edge/tenant_info*\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "yaml"
}
},
"outputs": [],
"source": [
"openapi: 3.1.0\n",
"info:\n",
" title: Jira API\n",
" description: API for interacting with Jira issues and sub-tasks.\n",
"Below are instructions on setting up authentication with Jira. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Jira Steps"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. <b>Create an Application</b>: The first step is to create a new application in Jira for the integration with ChatGPT. This can be done by visiting the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/), Clicking **Create** and selecting **OAuth 2.0 Integration**. "
"2. <b>Define Permissions</b>: Next we need to provide the required permissions to our application. Within the new application, open the **Permissions** menu from the sidebar, locate **Jira API** and click **Add** and then **Configure**."
"Required permissions will vary depending on the intended functionality of the GPT. In this scenario we wish to read and write to Jira issues, so select the following scopes under **Jira platform REST API** by clicking **Edit Scopes**:\n",
"3. <b>Configure Placeholder Callback URL</b>: In order to complete the following step and obtain a **Client ID** and **Secret** for enabling secure authentication between ChatGPT and Jira, we first need to add a placeholder callback URL. We can achieve this by clicking on **Authorization** in the sidebar, and **Configure** next to **OAuth 2.0 (3LO)**. From here simply enter a placeholder URL and click **Save Changes**.\n"
"4. <b>Application Client ID/Secret</b>: The next step is to locate the **Client ID** and **Secret** for enabling secure authentication between ChatGPT and Jira. We can find these values by clicking on **Settings** in the sidebar and scrolling down to **Authentication Details**. \n",
"- In your application in the Atlassian Developer Console, navigate to the **Authorization** sidebar tab, next to **OAuth 2.0 (3L0)** click **Configure**, and add your callback URL under **Callback URL**\n"
"- **Callback URL Error**: If you get a callback URL error in ChatGPT, double check the Callback URL value as it can occasionally change depending on any alterations made to the authentication\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Are there integrations that you’d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we’ll take a look.*\n"