[PR #21727] feat(confluence): add Confluence knowledge upload integration #41874

Open
opened 2026-04-25 13:58:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21727
Author: @christestet
Created: 2/22/2026
Status: 🔄 Open

Base: devHead: feat/confluence-integration


📝 Commits (6)

  • 1acc452 feat: add Confluence knowledge upload integration
  • 550ea02 refactor: align Confluence integration with Open WebUI settings patterns
  • 99f5eb6 feat(confluence): split admin endpoint config from user credentials
  • eae045c fix(confluence): fix bugs and add i18n translations
  • 53becf8 feat(confluence): add hierarchical tree view for page selection
  • 83d607b fix datacenter import and connection error, optimize imports, drop user and password support for confluence ds

📊 Changes

71 files changed (+5534 additions, -9 deletions)

View changed files

📝 backend/open_webui/config.py (+21 -0)
📝 backend/open_webui/main.py (+17 -0)
backend/open_webui/retrieval/loaders/confluence.py (+321 -0)
📝 backend/open_webui/routers/retrieval.py (+299 -1)
📝 src/lib/apis/retrieval/index.ts (+157 -0)
📝 src/lib/components/admin/Settings/Documents.svelte (+59 -0)
📝 src/lib/components/chat/Settings/Account.svelte (+130 -0)
src/lib/components/icons/Confluence.svelte (+14 -0)
📝 src/lib/components/workspace/Knowledge/KnowledgeBase.svelte (+36 -0)
📝 src/lib/components/workspace/Knowledge/KnowledgeBase/AddContentMenu.svelte (+16 -0)
src/lib/components/workspace/Knowledge/KnowledgeBase/ConfluenceImportModal.svelte (+981 -0)
📝 src/lib/i18n/locales/ar-BH/translation.json (+66 -0)
📝 src/lib/i18n/locales/ar/translation.json (+66 -0)
📝 src/lib/i18n/locales/bg-BG/translation.json (+58 -0)
📝 src/lib/i18n/locales/bn-BD/translation.json (+58 -0)
📝 src/lib/i18n/locales/bo-TB/translation.json (+56 -0)
📝 src/lib/i18n/locales/bs-BA/translation.json (+60 -0)
📝 src/lib/i18n/locales/ca-ES/translation.json (+60 -0)
📝 src/lib/i18n/locales/ceb-PH/translation.json (+58 -0)
📝 src/lib/i18n/locales/cs-CZ/translation.json (+62 -0)

...and 51 more files

📄 Description

Pull Request Checklist

  • Target branch: This PR targets the dev branch.
  • Description: Adds Confluence as a knowledge source for RAG — users can import pages directly from Confluence into Open WebUI knowledge bases.
  • Changelog: See below.
  • Documentation: Docs PR will follow in the Open WebUI Docs Repository.
  • Dependencies: No new dependencies. The loader uses requests (already a core Open WebUI dependency) to call the Confluence REST API directly.
  • Testing: Manually tested against Confluence Cloud and Confluence Server. Reproducible steps below.
  • Agentic AI Code: This PR was written with AI assistance (Claude Code) and has been manually reviewed and tested end-to-end by a human contributor.
  • Code review: Self-review performed. Code follows Open WebUI patterns (settings system, API structure, Svelte component conventions).
  • Design & Architecture: Follows existing settings/config patterns. Admin configures the Confluence endpoint; users provide their own API token credentials per request.
  • Git Hygiene: Rebased on upstream/dev. 5 atomic commits, no unrelated changes.
  • Title Prefix: feat — introduces a new integration feature.

Changelog Entry

Description

Adds a Confluence knowledge upload integration that allows users to import pages from Atlassian Confluence directly into Open WebUI knowledge bases. Admins configure the Confluence server endpoint; users authenticate with their own API token on each request. Pages are selected via a hierarchical space/page tree and imported as vectorized documents for RAG.

Note: This is a large feature PR. A discussion post to gather community feedback is recommended — happy to open one if the maintainers would like to discuss first.

Added

  • Confluence loader (backend/open_webui/retrieval/loaders/confluence.py): Fetches pages from Confluence Cloud and Data Center using the Confluence REST API directly via requests. Strips HTML to plain text, splits into chunks. No new package dependency — requests is already a core Open WebUI dependency.
  • Admin settings (Documents settings page): Admins can configure the Confluence base URL and deployment type. Supports both Confluence Cloud (https://<domain>.atlassian.net) and self-hosted Confluence Data Center.
  • User credentials (Account settings page): Each user provides their own Confluence email + API token (Cloud) or username + PAT/password (Data Center) when using the import modal. Credentials are submitted per-request and are not persisted server-side.
  • API endpoints (added to existing /retrieval router):
    • POST /retrieval/confluence/test — test connection with provided credentials
    • POST /retrieval/confluence/spaces — list spaces the user has access to
    • POST /retrieval/confluence/spaces/{space_key}/pages — list pages in a space (hierarchical)
    • POST /retrieval/confluence/import — import selected pages into a knowledge base
    • Admin endpoint config (ENABLE_CONFLUENCE_INTEGRATION, CONFLUENCE_BASE_URL, CONFLUENCE_DEPLOYMENT_TYPE) is handled via the existing GET /retrieval/config / POST /retrieval/config/update endpoints.
  • ConfluenceImportModal.svelte: Full import UI with space browser, hierarchical page tree with checkboxes, progress feedback, and error handling.
  • AddContentMenu: "Import from Confluence" entry added to the knowledge base content menu.
  • Confluence.svelte icon: SVG icon component for the Confluence logo.
  • i18n translations: All new UI strings added to en-US (and stub entries for all other locales).

Changed

  • backend/open_webui/config.py: Added CONFLUENCE_* config variables (ENABLE_CONFLUENCE_INTEGRATION, CONFLUENCE_BASE_URL, CONFLUENCE_DEPLOYMENT_TYPE).
  • backend/open_webui/routers/retrieval.py: Added Confluence endpoints and config fields to the existing retrieval router and config model.
  • src/lib/stores/index.ts: Added Confluence config to the app state store.
  • src/lib/apis/retrieval/index.ts: Added typed API client functions for all Confluence endpoints.

Fixed

  • N/A (new feature)

Security

  • The Confluence endpoint (base URL and deployment type) can only be configured by admins; regular users cannot change the server URL.
  • Users supply their own API tokens per request — no shared service account, no server-side credential storage.

Breaking Changes

  • None.

Additional Information

Why this is useful for Open WebUI:
Many organizations use Confluence as their primary internal knowledge base. This integration makes it trivial to turn Confluence content into RAG-ready knowledge without manual export/import workflows.

Architecture decisions:

  • Admin controls the Confluence base URL (preventing users from pointing to arbitrary servers).
  • Users supply their own API tokens per request (no shared service account needed, better security posture, no credential storage concerns).
  • Hierarchical page tree respects Confluence's parent/child structure for easier navigation.
  • Uses requests directly against the Confluence REST API — no additional package dependency.

How to test (manual):

  1. Go to Admin → Documents → enable Confluence, set your Confluence base URL and deployment type.
  2. Open a Knowledge Base → click Add ContentImport from Confluence.
  3. In the modal, enter your Confluence email + API token (Cloud) or username + PAT (Data Center).
  4. Browse spaces, expand pages, select the ones you want, click Import.
  5. Verify the pages appear as documents in the knowledge base and are queryable via chat.

Screenshots or Videos

(Screenshots available on request — the modal shows a space selector, a hierarchical page tree with checkboxes, and a progress bar during import.)


Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/21727 **Author:** [@christestet](https://github.com/christestet) **Created:** 2/22/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `feat/confluence-integration` --- ### 📝 Commits (6) - [`1acc452`](https://github.com/open-webui/open-webui/commit/1acc4529888f9d0df30d6530e4e2000bafe1b6e9) feat: add Confluence knowledge upload integration - [`550ea02`](https://github.com/open-webui/open-webui/commit/550ea02d44946f606ddb6fd015d467b247c3916d) refactor: align Confluence integration with Open WebUI settings patterns - [`99f5eb6`](https://github.com/open-webui/open-webui/commit/99f5eb67b9251388f9d38656a3fa7ac137dad227) feat(confluence): split admin endpoint config from user credentials - [`eae045c`](https://github.com/open-webui/open-webui/commit/eae045c3ecbafcb2ea499ccbadcc3d0ae7027e99) fix(confluence): fix bugs and add i18n translations - [`53becf8`](https://github.com/open-webui/open-webui/commit/53becf87d484a869806ebb74f8f79d352a867721) feat(confluence): add hierarchical tree view for page selection - [`83d607b`](https://github.com/open-webui/open-webui/commit/83d607bcbf08ae129b24a2dc634e2f0b984beebe) fix datacenter import and connection error, optimize imports, drop user and password support for confluence ds ### 📊 Changes **71 files changed** (+5534 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+21 -0) 📝 `backend/open_webui/main.py` (+17 -0) ➕ `backend/open_webui/retrieval/loaders/confluence.py` (+321 -0) 📝 `backend/open_webui/routers/retrieval.py` (+299 -1) 📝 `src/lib/apis/retrieval/index.ts` (+157 -0) 📝 `src/lib/components/admin/Settings/Documents.svelte` (+59 -0) 📝 `src/lib/components/chat/Settings/Account.svelte` (+130 -0) ➕ `src/lib/components/icons/Confluence.svelte` (+14 -0) 📝 `src/lib/components/workspace/Knowledge/KnowledgeBase.svelte` (+36 -0) 📝 `src/lib/components/workspace/Knowledge/KnowledgeBase/AddContentMenu.svelte` (+16 -0) ➕ `src/lib/components/workspace/Knowledge/KnowledgeBase/ConfluenceImportModal.svelte` (+981 -0) 📝 `src/lib/i18n/locales/ar-BH/translation.json` (+66 -0) 📝 `src/lib/i18n/locales/ar/translation.json` (+66 -0) 📝 `src/lib/i18n/locales/bg-BG/translation.json` (+58 -0) 📝 `src/lib/i18n/locales/bn-BD/translation.json` (+58 -0) 📝 `src/lib/i18n/locales/bo-TB/translation.json` (+56 -0) 📝 `src/lib/i18n/locales/bs-BA/translation.json` (+60 -0) 📝 `src/lib/i18n/locales/ca-ES/translation.json` (+60 -0) 📝 `src/lib/i18n/locales/ceb-PH/translation.json` (+58 -0) 📝 `src/lib/i18n/locales/cs-CZ/translation.json` (+62 -0) _...and 51 more files_ </details> ### 📄 Description <!-- ⚠️ CRITICAL CHECKS FOR CONTRIBUTORS (READ, DON'T DELETE) ⚠️ 1. Target the `dev` branch. PRs targeting `main` will be automatically closed. 2. Do NOT delete the CLA section at the bottom. It is required for the bot to accept your PR. --> # Pull Request Checklist - [x] **Target branch:** This PR targets the `dev` branch. - [x] **Description:** Adds Confluence as a knowledge source for RAG — users can import pages directly from Confluence into Open WebUI knowledge bases. - [x] **Changelog:** See below. - [x] **Documentation:** Docs PR will follow in the [Open WebUI Docs Repository](https://github.com/open-webui/docs). - [x] **Dependencies:** No new dependencies. The loader uses `requests` (already a core Open WebUI dependency) to call the Confluence REST API directly. - [x] **Testing:** Manually tested against Confluence Cloud and Confluence Server. Reproducible steps below. - [x] **Agentic AI Code:** This PR was written with AI assistance (Claude Code) and has been manually reviewed and tested end-to-end by a human contributor. - [x] **Code review:** Self-review performed. Code follows Open WebUI patterns (settings system, API structure, Svelte component conventions). - [x] **Design & Architecture:** Follows existing settings/config patterns. Admin configures the Confluence endpoint; users provide their own API token credentials per request. - [x] **Git Hygiene:** Rebased on `upstream/dev`. 5 atomic commits, no unrelated changes. - [x] **Title Prefix:** `feat` — introduces a new integration feature. --- # Changelog Entry ### Description Adds a Confluence knowledge upload integration that allows users to import pages from Atlassian Confluence directly into Open WebUI knowledge bases. Admins configure the Confluence server endpoint; users authenticate with their own API token on each request. Pages are selected via a hierarchical space/page tree and imported as vectorized documents for RAG. > **Note:** This is a large feature PR. A [discussion post](https://github.com/open-webui/open-webui/discussions) to gather community feedback is recommended — happy to open one if the maintainers would like to discuss first. ### Added - **Confluence loader** (`backend/open_webui/retrieval/loaders/confluence.py`): Fetches pages from Confluence Cloud and Data Center using the Confluence REST API directly via `requests`. Strips HTML to plain text, splits into chunks. No new package dependency — `requests` is already a core Open WebUI dependency. - **Admin settings** (`Documents` settings page): Admins can configure the Confluence base URL and deployment type. Supports both Confluence Cloud (`https://<domain>.atlassian.net`) and self-hosted Confluence Data Center. - **User credentials** (`Account` settings page): Each user provides their own Confluence email + API token (Cloud) or username + PAT/password (Data Center) when using the import modal. Credentials are submitted per-request and are not persisted server-side. - **API endpoints** (added to existing `/retrieval` router): - `POST /retrieval/confluence/test` — test connection with provided credentials - `POST /retrieval/confluence/spaces` — list spaces the user has access to - `POST /retrieval/confluence/spaces/{space_key}/pages` — list pages in a space (hierarchical) - `POST /retrieval/confluence/import` — import selected pages into a knowledge base - Admin endpoint config (`ENABLE_CONFLUENCE_INTEGRATION`, `CONFLUENCE_BASE_URL`, `CONFLUENCE_DEPLOYMENT_TYPE`) is handled via the existing `GET /retrieval/config` / `POST /retrieval/config/update` endpoints. - **`ConfluenceImportModal.svelte`**: Full import UI with space browser, hierarchical page tree with checkboxes, progress feedback, and error handling. - **`AddContentMenu`**: "Import from Confluence" entry added to the knowledge base content menu. - **`Confluence.svelte` icon**: SVG icon component for the Confluence logo. - **i18n translations**: All new UI strings added to `en-US` (and stub entries for all other locales). ### Changed - `backend/open_webui/config.py`: Added `CONFLUENCE_*` config variables (`ENABLE_CONFLUENCE_INTEGRATION`, `CONFLUENCE_BASE_URL`, `CONFLUENCE_DEPLOYMENT_TYPE`). - `backend/open_webui/routers/retrieval.py`: Added Confluence endpoints and config fields to the existing retrieval router and config model. - `src/lib/stores/index.ts`: Added Confluence config to the app state store. - `src/lib/apis/retrieval/index.ts`: Added typed API client functions for all Confluence endpoints. ### Fixed - N/A (new feature) ### Security - The Confluence endpoint (base URL and deployment type) can only be configured by admins; regular users cannot change the server URL. - Users supply their own API tokens per request — no shared service account, no server-side credential storage. ### Breaking Changes - None. --- ### Additional Information **Why this is useful for Open WebUI:** Many organizations use Confluence as their primary internal knowledge base. This integration makes it trivial to turn Confluence content into RAG-ready knowledge without manual export/import workflows. **Architecture decisions:** - Admin controls the Confluence base URL (preventing users from pointing to arbitrary servers). - Users supply their own API tokens per request (no shared service account needed, better security posture, no credential storage concerns). - Hierarchical page tree respects Confluence's parent/child structure for easier navigation. - Uses `requests` directly against the Confluence REST API — no additional package dependency. **How to test (manual):** 1. Go to **Admin → Documents** → enable Confluence, set your Confluence base URL and deployment type. 2. Open a Knowledge Base → click **Add Content** → **Import from Confluence**. 3. In the modal, enter your Confluence email + API token (Cloud) or username + PAT (Data Center). 4. Browse spaces, expand pages, select the ones you want, click **Import**. 5. Verify the pages appear as documents in the knowledge base and are queryable via chat. ### Screenshots or Videos _(Screenshots available on request — the modal shows a space selector, a hierarchical page tree with checkboxes, and a progress bar during import.)_ --- ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. --> By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 13:58:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#41874