Bitrix24 and Confluence Integration Setup
Documentation lives in Confluence, work processes in Bitrix24. When a manager creates a task, they copy a link to a Confluence article in the description. A week later the article is updated, but the link in the task points to an outdated version — or to a page that was renamed and moved. A developer opens the task and sees a broken link. Knowledge in Confluence and work in B24 exist separately from each other, and manual linking doesn't withstand even minimal load.
Integration architecture
The connection is built on Confluence REST API v2 (or v1 for Server/Data Center) and B24 REST API. Middleware processes data exchange between systems: tracks changes in Confluence and translates them to B24, also syncs links and metadata.
Confluence (webhook) → Middleware → B24 REST API → Tasks/Chat/Feed
B24 (task/CRM) → Middleware → Confluence API → Search/Get pages
Confluence Cloud supports webhooks via Connect apps or Forge. For Server/Data Center — plugins or built-in webhooks (Administration → Webhooks). Middleware subscribes to events: page_created, page_updated, page_removed, comment_created.
Linking Confluence pages to B24 tasks
Middleware automates documentation linking to tasks:
-
Custom field
UF_CONFLUENCE_URLin B24 tasks stores link to Confluence page. Middleware extractscontent_idfrom link and pulls metadata via API: title, author, update date. -
Card placement. Local B24 app (
TASK_VIEW_TAB) displays "Documentation" tab — list of linked pages with current titles, statuses and previews.
When Confluence page changes (webhook page_updated), middleware finds all B24 tasks where this page is linked and adds comment: "Page "{title}" updated {author}, {date}. Link: {url}".
Search in Confluence from B24
Middleware provides search interface in Confluence right from Bitrix24:
- User opens widget (or slash-command in chat) and enters search query.
- Middleware calls
GET /wiki/rest/api/content/search?cql=text~"{query}"— search via CQL (Confluence Query Language). - Results displayed with titles, spaces and update dates.
- User clicks — link opens in Confluence or attaches to current task.
For B24 chatbots — command /wiki {query}, which returns top-5 search results in message format.
Content synchronization
Two sync modes:
| Mode | Description | Application |
|---|---|---|
| Link-based | Only link and page metadata stored in B24. Content read in Confluence. | Standard scenario |
| Mirror | Page content duplicated in B24 knowledge base (section "Knowledge"). | For teams working mainly in B24 |
Mirror mode: middleware on Confluence page update requests content via GET /wiki/rest/api/content/{id}?expand=body.storage, converts Confluence Storage Format (XHTML-like) to B24 format and creates or updates article in "Knowledge Base" via B24 API.
Content migration
For migration from Confluence to B24 knowledge base (or vice versa), middleware supports bulk migration:
- Export page tree from Confluence space via
GET /wiki/rest/api/content?spaceKey={key}&type=page&limit=100with pagination. - Convert content from Confluence Storage Format: tables, macros, attachments, images.
- Create pages in B24 knowledge base preserving hierarchy (parent-child).
- Transfer attachments: download via
GET /wiki/rest/api/content/{id}/child/attachment, upload to B24 disk.
Confluence macros (code blocks, info panels, expand) convert to closest B24 analogs or replace with HTML blocks.
Change notifications
Middleware translates Confluence events to B24 chats:
- New page in project space → message to project B24 chat.
- Page update → notification to subscribed users (map Confluence watchers → B24 users).
- New comment → message to linked task author.
Authentication
-
Confluence Cloud: OAuth 2.0 via Atlassian Connect or API token (
email:tokenin Basic Auth). - Confluence Server/Data Center: Personal Access Token or Basic Auth.
-
B24: OAuth 2.0 with scope
task,im,disk,user. - Middleware stores credentials encrypted. For Cloud — refresh token updates automatically.
What we implement
- Middleware for linking Confluence pages to B24 tasks
- Automatic notifications about documentation updates in B24 chats
- Search in Confluence from B24 interface
- Content mirroring to B24 knowledge base (optional)
- Bulk migration of pages between systems
- Documentation linking and tracking in task cards







