April 21, 2026

How to Embed Git Files in Confluence Live, Always in Sync

Volkan Selim Cantürk

Growth Marketer

Share this article

How to Embed GitLab Files in Confluence — Live, Always in Sync

Paste a GitLab URL into any Confluence page. The file renders instantly — Markdown, diagrams, API specs, source code. No copy-pasting. No scheduled jobs.

30+ File Formats GitLab Cloud & Self-Managed Free for ≤10 Users Atlassian Forge
TL;DR

Git for Confluence embeds GitLab files directly into Confluence pages — Markdown, Mermaid diagrams, OpenAPI specs, source code, and 30+ other formats. Content stays in GitLab. Confluence pulls it live on every page view. No storage, no sync jobs, no duplicated docs. Free for teams up to 10 users.

Why GitLab and Confluence don't connect out of the box

Developers live in GitLab. READMEs, architecture diagrams, API specs, runbooks, security policies — all of it lives in repositories, version-controlled and accurate.

Business and non-technical teams live in Confluence. Product managers, architects, technical writers, and support teams use Confluence to stay aligned. They don't have GitLab access, and they shouldn't need it just to read a diagram.

The standard workaround is copy-paste: someone copies content from GitLab into a Confluence page. Within days, the source changes. The Confluence version doesn't. Now there are two versions of the truth — and the wrong one is the one most people are reading.

Stale docs aren't just inconvenient. Teams make decisions based on them. Someone follows an outdated runbook and breaks something. An auditor asks for compliance docs and gets a version from six months ago. The Confluence page becomes a liability instead of an asset.

How Git for Confluence works

Git for Confluence closes the gap between GitLab and Confluence. GitLab content stays in GitLab. Confluence pages pull it live. One source of truth, accessible everywhere work happens.

1
Paste a URL

Copy any file URL from GitLab. Paste it into a Confluence page. The macro appears automatically.

2
It renders instantly

Markdown becomes formatted text. Mermaid becomes a diagram. OpenAPI becomes interactive docs.

3
It stays in sync

Every page view fetches the current version from GitLab. Commit a change — Confluence shows it next time someone opens the page.

There's no scheduled sync, no webhook to configure, no pipeline to maintain. File content is never stored on Git for Confluence's servers. Every page view triggers a fresh fetch from your repository.

For private repositories, content is fetched via an authenticated user (OAuth) or an admin-configured access token. Viewers — including people without a GitLab account — can see embedded content as long as the token has access.


What you can embed: 30+ file formats

Git for Confluence renders files visually — not as raw text. Supported categories:

Documentation
  • Markdown
  • AsciiDoc
  • HTML
Diagrams
  • Mermaid
  • PlantUML
  • Graphviz / DOT
  • Structurizr (C4)
  • BPMN
  • Vega / Vega-Lite
  • AsyncAPI
  • SVG
API docs
  • OpenAPI / Swagger
  • Interactive rendering
Source code
  • Python, Java, JS, TS
  • C#, Ruby, PHP, Go
  • Rust + more
  • Syntax highlighting
Data & config
  • YAML, JSON, XML
  • CSV
  • Config files
Documents
  • PDF
  • Jupyter Notebooks
Images
  • PNG, JPG, GIF
  • SVG (rendered)

Diagrams from GitLab in Confluence

Most teams store architecture diagrams as images in Lucidchart or draw.io. Those diagrams drift — nobody updates them when the system changes because it's a separate task, disconnected from the development workflow.

Diagrams-as-code changes this. A Mermaid or PlantUML file lives in the same repository as the code it describes — part of the same pull request, reviewed, versioned, and traceable to a commit.

Git for Confluence renders these files visually in Confluence. A .mermaid file becomes a flowchart. A .puml file becomes a sequence diagram. A Structurizr file renders as a C4 architecture diagram.

When docs live with code, they stay accurate. No Lucidchart license needed. No diagram going stale because someone forgot to update it.

Try it: embed a GitLab file in under 5 minutes

Public repository

1
Open the file in GitLab and copy the URL
2
Open any Confluence page in edit mode
3
Paste the URL — Git for Confluence recognizes GitLab URLs automatically
4
The macro renders the file. No additional setup needed.

Private repository

1
One-time admin setup: configure OAuth or a managed access token (~5 minutes)
2
Users paste GitLab URLs exactly as above
3
Authentication is handled in the background — viewers don't need their own GitLab accounts

GitLab self-managed

GitLab self-managed instances (version 14.4+) are fully supported. Admins add the self-managed provider once under Manage apps → Git for Confluence Administration → Add a Self Managed Provider. After that, URLs from that instance are recognized automatically.


Access control: individual vs. managed

Individual access (OAuth 2.0)

Users connect their own GitLab accounts via OAuth. They can embed and share any content their account has access to. Best for smaller teams where everyone has GitLab accounts and direct control matters.

Managed access (token-based)

An admin configures one access token at the organization level. All content shared via managed access is served through that token. Viewers — including people without a GitLab account — can see embedded content as long as the token has access.

Admins control which Confluence user groups can embed content. There's a full activity log. Revoking the token instantly stops all sharing. Best for larger organizations with centralized governance requirements or non-technical stakeholders who need read access without GitLab accounts.

Both modes can coexist. Individual users can use OAuth; the organization can use managed access for shared documentation spaces.

How to get started

1
Install from the Atlassian Marketplace — search "Git for Confluence". 30-day free trial. Free for teams up to 10 users.
2
Paste a public GitLab URL into any Confluence page. You'll see it render in seconds.
3
Connect a private repository — an admin follows the setup guide (~5 minutes for OAuth, slightly longer for managed access).
4
Embed your first real file — a README, an architecture diagram, or an OpenAPI spec.

Try Git for Confluence free for 30 days

Free for teams up to 10 users. Up and running in under 5 minutes.

Frequently asked questions

Copy the file URL from GitLab and paste it into a Confluence page in edit mode. Git for Confluence detects the URL and renders the content automatically. For private repos, an admin sets up authentication first — either OAuth or a managed access token.
Yes. GitLab self-managed instances version 14.4 and above are supported. Admins add the self-managed provider once in the app's administration panel. After that, URLs from that instance are recognized automatically — no per-user configuration needed.
No scheduling needed. Content is fetched live from GitLab every time a Confluence page is viewed. Nothing is stored on Git for Confluence's servers. The page always reflects the current state of the file in your repository.
Individual access uses OAuth — each user connects their own GitLab account and shares content on their own behalf. Managed access uses one admin-configured token for the whole organization, allowing even users without GitLab accounts to view embedded content. Both modes can coexist.
30+ formats: Markdown, Mermaid, PlantUML, OpenAPI/Swagger, AsciiDoc, SVG, Graphviz, BPMN, Structurizr, Vega, AsyncAPI, source code in all major languages, images (PNG, JPG, GIF), YAML, JSON, XML, PDF, and more. If a format isn't recognized it renders as plain text — nothing breaks.
Yes, with managed access. An admin sets up a single access token. Confluence users — including those with no GitLab account — can view content shared through that token. They see what they need to see; the repository stays secure.
Yes. Git for Confluence supports GitHub, GitLab (cloud and self-managed), Azure DevOps, and Bitbucket. It's the only Confluence app covering all four major Git providers.
Share this article

Avisi Apps builds apps you can trust

SOC 2
ISO 27701:2019 & ISO 27001:2022
GDPR/CCPA
HIPAA/NIS2