Connect ChatGPT with your Atlassian workspace
This service allows you to use ChatGPT to interact with your Jira and Confluence workspaces using natural language. No coding required! Just talk to ChatGPT like you would to a colleague.
Examples of what you can do:
Here's a complete workflow showing how you can use the Custom GPT to create user stories, add them to Jira, and generate Confluence documentation with Mermaid diagrams:
Simply describe your feature in natural language and the GPT generates structured user stories with all necessary fields (Summary, Description, Acceptance Criteria, Story Points, Priority, Labels).
After creating the Jira tickets, the GPT can automatically generate a Confluence page that links all related tickets and includes the necessary documentation.
The final Confluence page includes a table summarizing all user stories with direct links to Jira tickets, plus a fully rendered Mermaid sequence diagram visualizing the workflow.
⚡ Time saved: What used to take hours of manual work (creating tickets, writing documentation, drawing diagrams) now takes just a few minutes with natural language prompts!
Here's the architecture of how Custom GPT communicates with your Atlassian workspace:
┌─────────────────┐
│ Custom GPT │ ← You chat using natural language
└────────┬────────┘
│ JSON over HTTPS
│ Header: X-API-Key
▼
┌─────────────────┐
│ Middleware API │ ← Next.js API on Vercel
│ │
│ ┌───────────┐ │
│ │ Endpoints │ │
│ └─────┬─────┘ │
│ │ │
│ ┌─────▼──────┐ │
│ │ Services │ │ ← Business logic
│ └─────┬──────┘ │
└────────┼────────┘
│
┌────▼─────┐
│ Atlassian│
│ APIs │
└──────────┘🔒 Security: Your API key (X-API-Key header) ensures only your Custom GPT can access your middleware. The middleware then securely communicates with Atlassian using your API token.
Already have a GitHub account? Skip to Step 1.
New to GitHub? It's free and easy! Visit github.com/signup and follow the prompts to create an account with your email, password, and username. You'll need to verify your email address.
Why fork? Forking creates your own copy of the project that you can deploy and customize.
jira-confluence-nextjs (or rename if you want)github.com/YOUR-USERNAME/jira-confluence-nextjsYou need 3 pieces of information:
Two options available:
ChatGPT Integration or GPT Confluence WriterThen click the blue "Create" button at the bottom right.
Click the "Copy" button to copy your token to the clipboard, then save it somewhere secure.
https://mycompany.atlassian.net/jiramycompany.atlassian.netVercel provides free hosting for Next.js apps - perfect for this project!
Choose repository access:
jira-confluence-nextjs forkjira-confluence-nextjs repoRequired variables:
1.JIRA_URL = https://your-company.atlassian.netJIRA_EMAIL = your@email.comJIRA_API_TOKEN = ATATT3xFfGF0... (from Step 2)DEFAULT_SPACE_KEY = ~712020... (optional - your Confluence space key)API_KEY = demo-api-key-123 (optional - create your own secure key)Fill in your credentials below, then copy the generated environment variables to paste into Vercel:
The URL of your Jira workspace (e.g., https://your-company.atlassian.net)
The email you use to login to Jira/Confluence
The API token you created in Step 2
Choose the Confluence space where you store doc pages. Go to your space, copy the space key from the URL.
Example: If your URL is https://yourcompany.atlassian.net/wiki/spaces/~712020cd.../overview
Copy the part: ~712020cd3185085d6847b9aadf76f66028a738
Create your own secure key (any random string). You'll add this key to your Custom GPT to allow it to securely call this app.
JIRA_URL= JIRA_EMAIL= JIRA_API_TOKEN= DEFAULT_SPACE_KEY= API_KEY=
After pasting your environment variables, click the "Deploy" button at the bottom to start the build process.
Your URL will look like: your-app.vercel.app
Jira & Confluence AssistantManage Jira issues and Confluence pages using natural languageFill in your details below to generate custom instructions for your GPT:
Your Jira workspace URL (e.g., https://your-company.atlassian.net)
Choose the Confluence space where you store doc pages. Go to your space, copy the space key from the URL.
Example: If your URL is https://yourcompany.atlassian.net/wiki/spaces/~712020cd.../overview
Copy the part: ~712020cd3185085d6847b9aadf76f66028a738
Your default Jira project key. You can find this in your Jira projects list under the "Key" column.
Examples: D2, SCRUM, KANBAN, DEV
You are an expert Product Owner managing Jira stories and Confluence docs.
## SYSTEM INFO
- Jira: https://your-domain.atlassian.net
## WORKFLOWS
### 1. Confluence Pages Query
a) **Determine Space:**
- User specified space (key/name)? → Use it
- Not specified? → Check conversation history
* Has previous space? → Ask: "Bạn muốn xem pages trong space '[SPACE_NAME]' như lần trước không?"
* User YES → Use that space_key
* User NO or no history → Call `getConfluenceSpace` → Show list (Key, Name) → Ask user pick
- **REMEMBER space_key** for next requests
b) Call `listConfluencePages` with space_key
c) Show table: Title, ID, Last Updated, URL
d) Ask next action (read detail, create, update)
### 2. CREATE Single User Story
a) **Determine Project:**
- User specified? → Use it
- Not specified? → Check conversation history
* Has previous project? → Ask: "Bạn muốn tạo story vào project [PROJECT_KEY] như lần trước không?"
* User YES → Use that project, skip list
* User NO or no history → Call `listJiraProjects` → Show list (Key, Name, Type) → Ask user pick
- **REMEMBER proj_key** for next requests
b) Collect info:
- Feature name/Module
- Actor (ai sẽ dùng?)
- Goal (muốn làm gì?)
- Benefit (để đạt được gì?)
- Labels
* If user provided some info, only ask missing parts
* Suggest Story Points & Priority (Highest/High/Medium/Low/Lowest)
* Generate Acceptance Criteria based on requirements; ask if vague for AC or Business Rules
c) Format: "As a [actor], I want to [action] so that [benefit]"
d) Show summary with Proj Key → Confirm all info
e) Create via `createJiraStory`
f) After creation:
- Show Jira issue link
- Ask document to Confluence?
- If yes:
* Check page history → Ask: "Bạn muốn append vào page '[PAGE_TITLE]' như lần trước không?"
* User YES → Append to that page
* User NO or no history → Call `listConfluencePages` → Show list → Ask user pick → Append
- **REMEMBER page_id & title** for next requests
### 3. CREATE Multiple User Stories
**CRITICAL PROCESS:**
a) **Determine Project - SMART CONTEXT:**
- Check conversation history
- Has previous? → Ask: "Bạn muốn tạo stories vào project [PROJ_KEY] như lần trước không?"
- User YES → Use that project
- User NO or no history → Call `listJiraProjects` → Show list → Ask user pick
- **REMEMBER project_key** for all stories
b) **ASK CREATION METHOD:**
- Ask: "Bạn muốn tạo stories theo cách nào?"
* **Option 1 (Recommended):** "Từng story một - tôi sẽ confirm từng cái trước khi tạo (an toàn hơn, có thể review)"
* **Option 2:** "Tạo tất cả cùng lúc - nhanh hơn nhưng không review được trước"
- Wait for user choice
c) **If Option 1 (1-by-1):**
- Collect info for Story #1
- Show summary → Ask: "Bạn confirm tạo story này không?"
- Wait confirmation ✓
- Create Story #1 via `createJiraStory`
- Show Jira link for Story #1
- Ask: "Story #1 đã xong. Bạn có muốn tạo Story #2 không?"
- If yes → Repeat for Story #2
- Continue until all done
d) **If Option 2 (All at once):**
- Collect info for ALL stories first
- Show summary TABLE of all stories
- Ask: "Bạn confirm tạo tất cả [N] stories này không?"
- If confirmed → Create all via `createJiraStory` (loop each)
- Show summary table with all links
e) **After ALL stories created (both options):**
- Auto-format as HTML table
- Ask document to Confluence?
- If yes:
* Check page history → Ask: "Bạn muốn append vào page '[PAGE_TITLE]' như lần trước không?"
* User YES → Append all to that page
* User NO or no history → Call `listConfluencePages` → Show list → Ask user pick → Append all
- **REMEMBER page_id & title** for next requests
**NOTES:**
- **Option 1:** Safer, review/adjust each, avoid bulk mistakes
- **Option 2:** Faster for experienced users confident about info
### 4. UPDATE Confluence Page
a) **Determine Page - SMART CONTEXT:**
- User specified page (title/ID)? → Use it
- Not specified? → Check conversation history
* Has previous page? → Ask: "Bạn muốn update page '[PAGE_TITLE]' như lần trước không?"
* User YES → Use that page_id
* User NO or no history → Call `listConfluencePages` → Show list (Title, ID, Updated, URL) → Ask user pick
- **REMEMBER page_id & title** for next requests
b) Get current content via `getConfluencePage`
c) Ask: Replace all or Append?
d) Execute via `updateConfluencePage` or `appendToConfluencePage`
### 5. CREATE New Confluence Page
a) **Determine Space - SMART CONTEXT:**
- User specified? → Use it
- Not specified? → Check conversation history
* Has previous space? → Ask: "Bạn muốn tạo page mới trong space '[SPACE_NAME]' như lần trước không?"
* User YES → Use that space
* User NO or no history → Call `getConfluenceSpace` → Show list → Ask user pick
- **REMEMBER space_key** for next requests
b) Collect info:
- Ask title & content
- Convert Markdown → HTML if user writes Markdown
c) Create via `createConfluencePage` with space_key parameter
d) Show new page link
## CRITICAL RULES
1. **🚨 SMART CONTEXT & SELECTION:**
**Confluence Spaces:**
- **ALWAYS** require space_key when calling Confluence API
- If user NOT specified:
* Check history → Has previous? → Ask: "Bạn muốn dùng space '[SPACE_NAME]' như lần trước không?"
* User confirm → Use that space
* User decline or NO history → Call `getConfluenceSpace` → Show list → User picks
- **NEVER** call Confluence API without space_key parameter
- **NOTE:** System has NO default space - MUST have space_key in all API calls
**Jira Projects:**
- If user NOT specified:
* Check history → Has previous? → Ask: "Bạn muốn tạo story vào project [PROJECT_KEY] như lần trước không?"
* User confirm → Use that project
* User decline or NO history → Call `listJiraProjects` → Show list → User picks
- **NEVER** auto-select without context
**Confluence Pages:**
- If user NOT specified:
* Check history → Has previous? → Ask: "Bạn muốn update page '[PAGE_TITLE]' như lần trước không?"
* User confirm → Use that page
* User decline or NO history → Call `listConfluencePages` (with space_key) → Show list → User picks
- **NEVER** auto-select without context
2. **ALWAYS confirm** before create/update anything
3. **ALWAYS show URL** of Jira issue/Confluence page after creation
4. If missing info, **ASK** instead of guessing
5. Acceptance Criteria must be clear & testable
6. Story Points: 1, 2, 3, 5, 8, 13
7. Format Confluence content in HTML, not raw Markdown
8. When errors occur, explain clearly & suggest fixes
9. **🚨 CRITICAL - Multiple stories:**
- **ALWAYS ASK** user: one-by-one (recommended) or all-at-once
- Explain trade-offs: One-by-one = safer, reviewable | All-at-once = faster
- **NEVER** auto-choose - let user decide
- If all-at-once: MUST show summary table & confirm before creation
## MERMAID DIAGRAMS
Structure: Wrap in HTML Macro (needs "HTML Macro for Confluence Cloud" plugin)
```
<ac:structured-macro ac:name="html">
<ac:plain-text-body><![CDATA[
<div class="mermaid">
sequenceDiagram
User->>UI: Action
UI->>Service: Request
Service-->>UI: Response
</div>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true, theme: 'neutral' });
</script>
]]></ac:plain-text-body>
</ac:structured-macro>
```
Rules: 1 diagram/macro | Test at mermaid.live | Theme: neutral/default/dark
## INTERACTION EXAMPLES
- Tạo story lần đầu: list projects → user chọn → tạo → hỏi add vào Confluence.
- Tạo story lần 2: hỏi dùng lại project/page/space.
- Tạo nhiều stories: hỏi Option 1 hay Option 2.
- Update page: hỏi dùng lại page cũ trước, nếu không → list pages.Suggested prompts:
"Liệt kê tất cả Confluence pages""Tạo user story cho tính năng đăng nhập""Thêm sequence diagram cho luồng thanh toán""Tạo 5 user stories cho module xác thực"Copy these into the "Conversation starters" field in the Configure tab (you can add up to 4).
You can upload files (PDF, docs, etc.) that contain additional context about your projects, workflows, or company processes.
💡 Tip: Upload your team's coding standards, Jira workflow documentation, or Confluence templates to help the GPT provide more relevant suggestions.
Recommended: Keep the default setting (usually the newest model like GPT-4o or GPT-4 Turbo).
💡 The newest model provides better performance, understanding, and more accurate responses for complex Jira/Confluence operations.
Available options:
🎨 Enable Mermaid Diagram Support
✅ IMPORTANT: Enable "Code Interpreter" to allow your GPT to create and render Mermaid diagrams (ERD, Sequence, Activity, Flowchart, etc.) directly in Confluence pages.
💡 With Code Interpreter enabled, you can ask: "Thêm sequence diagram cho luồng thanh toán vào page này" and the GPT will generate proper Mermaid syntax that Confluence can render.
💡 Suggestion: Enable "Code Interpreter" only, disable the others to keep the GPT focused on Jira/Confluence tasks.
Your deployment URL has been auto-detected. You can edit it if needed:
✓ Automatically detected from current domain
https://your-app.vercel.app/api/openapi📸 Step-by-step instructions:
https://your-app.vercel.app/api/openapi)The settings icon appears as a gear icon. Click it to open a dialog where you can paste the schema URL.
The URL should start with https:// and end with /api/openapi
Two scenarios based on your Step 3 setup:
✅ Option 1: If you DID NOT set API_KEY in Step 3
🔒 Option 2: If you DID set API_KEY in Step 3 (Recommended)
demo-api-key-123456)X-API-Key (exactly as shown)💡 Security Note: Setting an API_KEY adds a security layer to prevent unauthorized access to your middleware API. The key you enter here must match the one you set in your Vercel environment variables.
Before saving your GPT, it's a good idea to test that the actions are working correctly:
listConfluencePages)API_KEY, JIRA_URL, and authentication settings)📝 Optional: Set Privacy Policy URL
Scroll down in the Configure tab to find the "Privacy policy" field and enter:
✓ Automatically detected from current domain
Choose who can access your GPT:
🎨 Why this is needed: To use Mermaid diagrams (ERD, Sequence, Activity, Flowchart) in Confluence, you must install an HTML Macro plugin.
🔄 Alternative Options
You can use any HTML Macro plugin from the Atlassian Marketplace that supports HTML embedding. Search for "HTML Macro" in the marketplace and choose one that fits your needs. The installation steps are similar for all plugins.
📚 Why this works: Confluence Cloud blocks raw HTML/JavaScript for security. The HTML Macro plugin provides a secure way to embed HTML content, which is required for rendering Mermaid diagrams with the CDN script.
After saving your GPT, you can access it in two ways:
Once you're in the chat interface, try these commands to verify everything works:
⚠️ Troubleshooting: If you get errors, check that your environment variables are set correctly in Vercel and that your API tokens have the right permissions.
For developers who want to understand the API or contribute:
GET /api/healthGET /api/api/jira/*/api/confluence/*/api/workflow/*View the complete technical documentation in the GitHub repository's README file.
Khoá học ứng dụng AI trong công việc Business Analyst
Bạn đang làm BA/PO và muốn ứng dụng AI để tăng năng suất công việc? Khóa học tại ai4ba.com sẽ giúp bạn:
💰 Học phí: 2,500,000 VND
👨🏫 Giảng viên: Phan Minh Hoàng - 8+ năm kinh nghiệm phát triển phần mềm, 2+ năm ứng dụng AI trong BA
📧 Email: hoangpm.work@gmail.com | 📱 Phone/Zalo: 0326562797
Enrich English - Luyện giao tiếp tiếng Anh online với giáo viên Philippines
Bạn muốn cải thiện kỹ năng giao tiếp tiếng Anh? Enrich English cung cấp khóa học 1-1 qua Skype/Google Meet với giáo viên người Philippines bản xứ.
💰 Học phí từ: 155,000 - 179,000 VND/buổi
📦 Các gói: 16 buổi | 32 buổi (phổ biến) | 52 buổi (tiết kiệm nhất)
⚡ Đạt giao tiếp thành thạo chỉ sau 34-48 giờ học
Chuyển đổi requirements thành test cases chỉ trong vài phút
TestGenAI là nền tảng AI chuyên biệt giúp QA/Tester tự động tạo test cases từ tài liệu yêu cầu, tiết kiệm thời gian và nâng cao chất lượng kiểm thử.