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:
This particular GPT Action provides an overview of how to connect to Confluence, Atlassian's collaboration and documentation platform. This Action takes a user’s question, scans the relevant Confluence spaces and pages to gather the necessary information, then formulates a response to answer the user’s question. This cookbook does not address updating content in Confluence directly from ChatGPT, but it is technically feasible to accomplish with additional Actions and scopes.
Value
Users can now leverage ChatGPT's natural language capability to connect directly to Confluence, enabling seamless interaction with their organization's knowledge base.
Example Use Cases
Check out these links from the application before you get started:
Before you get started, make sure you go through the following steps in your application environment:
Once you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
You are a "Confluence Savant", equipped with the ability to search our company's Product Wiki in Confluence to answer product-related questions.
You must ALWAYS perform the "getAccessibleResources" Action first to get the "cloudid" value you will need in subsequent Actions.
Your job is to provide accurate and detailed responses by retrieving information from the Product Wiki. Your responses should be clear, concise, and directly address the question asked. You have the capability to execute an action named "performConfluenceSearch" that allows you to search for content within our Confluence Product Wiki using specific terms or phrases related to the user's question.
- When you receive a query about product information, use the "performConfluenceSearch" action to retrieve relevant content from the Product Wiki. Formulate your search query based on the user's question, using specific keywords or phrases to find the most pertinent information.
- Once you receive the search results, review the content to ensure it matches the user's query. If necessary, refine your search query to retrieve more accurate results.
- Provide a response that synthesizes the information from the Product Wiki, clearly answering the user's question. Your response should be easy to understand and directly related to the query.
- If the query is complex or requires clarification, ask follow-up questions to the user to refine your understanding and improve the accuracy of your search.
- If the information needed to answer the question is not available in the Product Wiki, inform the user and guide them to where they might find the answer, such as contacting a specific department or person in the company.
Here is an example of how you might respond to a query:
User: "What are the latest features of our XYZ product?"
You: "The latest features of the XYZ product, as detailed in our Product Wiki, include [feature 1], [feature 2], and [feature 3]. These features were added in the recent update to enhance [specific functionalities]. For more detailed information, you can refer to the Product Wiki page [link to the specific Confluence page]."
Remember, your goal is to provide helpful, accurate, and relevant information to the user's query by effectively leveraging the Confluence Product Wiki.
Once you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
openapi: 3.1.0
info:
title: Atlassian API
description: This API provides access to Atlassian resources through OAuth token authentication.
version: 1.0.0
servers:
- url: https://api.atlassian.com
description: Main API server
paths:
/oauth/token/accessible-resources:
get:
operationId: getAccessibleResources
summary: Retrieves accessible resources for the authenticated user.
description: This endpoint retrieves a list of resources the authenticated user has access to, using an OAuth token.
security:
- bearerAuth: []
responses:
'200':
description: A JSON array of accessible resources.
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceArray'
/ex/confluence/{cloudid}/wiki/rest/api/search:
get:
operationId: performConfluenceSearch
summary: Performs a search in Confluence based on a query.
description: This endpoint allows searching within Confluence using the CQL (Confluence Query Language).
parameters:
- in: query
name: cql
required: true
description: The Confluence Query Language expression to evaluate.
schema:
type: string
- in: path
name: cloudid
required: true
schema:
type: string
description: The cloudid retrieved from the getAccessibleResources Action
- in: query
name: cqlcontext
description: The context to limit the search, specified as JSON.
schema:
type: string
- in: query
name: expand
description: A comma-separated list of properties to expand on the search result.
schema:
type: string
responses:
'200':
description: A list of search results matching the query.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResults'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
ResourceArray:
type: array
items:
$ref: '#/components/schemas/Resource'
Resource:
type: object
required:
- id
- name
- type
properties:
id:
type: string
description: The unique identifier for the resource.
name:
type: string
description: The name of the resource.
type:
type: string
description: The type of the resource.
SearchResults:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/SearchResult'
SearchResult:
type: object
properties:
id:
type: string
description: The unique identifier of the content.
title:
type: string
description: The title of the content.
type:
type: string
description: The type of the content (e.g., page, blog post).
space:
type: object
properties:
id:
type: string
description: The space ID where the content is located.
name:
type: string
description: The name of the space.
Below are instructions on setting up authentication with this 3rd party application. Have questions? Check out Getting Started Example to see how this step works in more detail.
Before you set up authentication in ChatGPT, make sure you go through the following steps within the Atlassian Developer portal to create your Confluence app:
In ChatGPT, click on "Authentication" and choose "OAuth". Enter in the information below.
Once you've set up authentication in ChatGPT, follow the steps below in the application to finalize the Action.
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.