├── README.md └── api-spec.json /README.md: -------------------------------------------------------------------------------- 1 | # GPTs-Jira-Confluence Integration Guide 2 | 3 | This project integrates OpenAI's GPTs Action with Atlassian's Confluence and Jira platforms. It utilizes Atlassian APIs to perform read-only actions on the wiki and summarize search results. 4 | 5 | ## Overview 6 | 7 | - **Objective**: To facilitate efficient and accurate searching of Confluence pages through Jira. 8 | - **Method**: Integration of OpenAI's GPTs Action with Atlassian's Confluence and Jira using Atlassian APIs. 9 | - **Functionality**: Read-only access to the wiki, summarizing search results. 10 | 11 | ## Demo 12 | 13 | https://www.youtube.com/watch?v=iSmyuyoFsac 14 | 15 | ## Setup Instructions 16 | 17 | ### Step 1: Create a Jira Token 18 | 19 | 1. **Generate Token**: Visit [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens) to create a new API token. 20 | 21 | ### Step 2: Encode Your Token with HTTP Basic Auth 22 | 23 | 1. **Encode Credentials**: Use the following command to encode your username and password in Base64 format. 24 | 25 | ```bash 26 | echo -n 'myusername:mypassword' | base64 27 | ``` 28 | 29 | ### Step 3: Create GPTs 30 | 31 | 1. **Access GPTs Editor**: Go to [GPTs Editor](https://chat.openai.com/gpts/editor). 32 | 2. **Configuration**: 33 | - **Name**: Jira Search 34 | - **Description**: Assists in searching Confluence pages accurately and efficiently. 35 | 36 | 3. **Set Up Instructions**: 37 | - **Instructions**: As the 'Confluence Searcher', your primary function is to assist users in finding the most current and relevant information from Confluence pages. Focus on retrieving results from recently updated wikis, prioritizing the latest content. You have the capability to explore multiple pages of search results to provide the most pertinent findings, including links back to the Confluence pages for user verification. Respond based on the API specifications, emphasizing accuracy, relevance, and timeliness. In cases of unclear or incomplete queries, prompt for clarifications. Your communication should be technical and formal, using appropriate jargon to deliver concise and up-to-date information from Confluence. 38 | 39 | 4. **Conversation Starters**: 40 | - Example: "When is the first Olympic games start?" 41 | 42 | 5. **Actions**: 43 | - **Import Action**: Click 'Import from URL' and use the following link: 44 | ``` 45 | https://raw.githubusercontent.com/righttang/gpts-jira-confluence/main/api-spec.json 46 | ``` 47 | - Update the Spec inline with your wiki address, must ends with `/wiki`. Example: 48 | ```json 49 | "url": "https://ai-gold-rush.atlassian.net/wiki" 50 | ``` 51 | 52 | 6. **Add Authentication**: 53 | - Click 'API Key'. 54 | - Choose 'Basic Auth'. 55 | - Add the key you generated on Step 2. 56 | 57 | 7. **Privacy Policy**: 58 | - Include a link to your private policy. 59 | 60 | *Once these steps are completed, your integration should be ready to use.* 61 | -------------------------------------------------------------------------------- /api-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "info": { 4 | "title": "Confluence Search API", 5 | "version": "1.0.0" 6 | }, 7 | "servers": [ 8 | { 9 | "url": "https://ai-gold-rush.atlassian.net/wiki" 10 | } 11 | ], 12 | "paths": { 13 | "/rest/api/content/search": { 14 | "get": { 15 | "summary": "Fetch a list of content using CQL", 16 | "operationId": "contentSearch", 17 | "parameters": [ 18 | { 19 | "name": "cql", 20 | "in": "query", 21 | "description": "A CQL query string to locate content", 22 | "required": true, 23 | "schema": { 24 | "type": "string" 25 | } 26 | }, 27 | { 28 | "name": "cqlcontext", 29 | "in": "query", 30 | "description": "The context to execute a CQL search in JSON serialized form", 31 | "required": false, 32 | "schema": { 33 | "type": "string" 34 | } 35 | }, 36 | { 37 | "name": "expand", 38 | "in": "query", 39 | "description": "A comma-separated list of properties to expand on the content", 40 | "required": false, 41 | "schema": { 42 | "type": "string" 43 | } 44 | }, 45 | { 46 | "name": "start", 47 | "in": "query", 48 | "description": "The start point of the collection to return", 49 | "required": false, 50 | "schema": { 51 | "type": "integer" 52 | } 53 | }, 54 | { 55 | "name": "limit", 56 | "in": "query", 57 | "description": "The limit of the number of items to return (default is 25)", 58 | "required": false, 59 | "schema": { 60 | "type": "integer" 61 | } 62 | } 63 | ] 64 | } 65 | }, 66 | "/rest/api/content/{contentId}": { 67 | "get": { 68 | "summary": "Read content and expand the body", 69 | "operationId": "readContentBody", 70 | "parameters": [ 71 | { 72 | "name": "contentId", 73 | "in": "path", 74 | "required": true, 75 | "description": "The ID of the content to retrieve", 76 | "schema": { 77 | "type": "string" 78 | } 79 | }, 80 | { 81 | "name": "expand", 82 | "in": "query", 83 | "description": "The part of the content to expand (e.g., body.storage)", 84 | "required": false, 85 | "schema": { 86 | "type": "string" 87 | } 88 | } 89 | ], 90 | "responses": { 91 | "200": { 92 | "description": "A paginated list of content", 93 | "content": { 94 | "application/json": { 95 | "schema": { 96 | "type": "object", 97 | "properties": { 98 | "results": { 99 | "type": "array", 100 | "items": { 101 | "type": "object" 102 | } 103 | } 104 | }, 105 | "additionalProperties": false 106 | } 107 | } 108 | } 109 | } 110 | } 111 | } 112 | } 113 | } 114 | } 115 | --------------------------------------------------------------------------------