Confluence export

unlisted

by Louis Carnec

Export the current markdown note to a Confluence page using the Confluence REST API and a personal API token.

Updated 1mo agoMIT
View on GitHub

Confluence Export

An Obsidian plugin that exports notes to Confluence using the Confluence REST API and a personal API token.

Features

  • Export the current note to a Confluence page with a single command or ribbon button
  • Export an entire folder recursively via the file-browser context menu
  • Images embedded in your notes are uploaded as Confluence attachments and rendered using the native image macro
  • Base64-encoded images (e.g. from pasted screenshots) are decoded, uploaded, and wired up automatically
  • The confluence_page_id frontmatter key is written back to the note after the first export, so subsequent exports update the same page rather than creating duplicates
  • Configurable default space key, parent page, and image width, all overridable per note via frontmatter

Installation

From the Obsidian community plugins list

  1. Open Obsidian Settings, navigate to Community plugins, and disable Safe mode if prompted.
  2. Click Browse, search for Confluence Export, and click Install.
  3. Enable the plugin and configure it under Settings > Confluence Export.

Manual installation

  1. Download main.js and manifest.json from the latest release.
  2. Copy both files into a new folder at <vault>/.obsidian/plugins/obsidian-confluence-export/.
  3. Reload Obsidian and enable the plugin under Settings > Community plugins.

Setup

Open Settings > Confluence Export and fill in:

SettingDescription
Base URLYour Confluence site URL, e.g. https://yourcompany.atlassian.net
Username / emailThe Atlassian account email associated with your API token
API tokenA personal API token created at id.atlassian.com
Default space keySpace where new pages are created, e.g. DOCS
Default parent page IDOptional page ID to place new pages under
Image width (px)Maximum display width for uploaded images (default: 800)
Overwrite existing pagesWhen enabled, exporting a note whose title already exists updates that page instead of failing (disabled by default)

Usage

Export a single note

With a markdown note open:

  • Run the command Confluence Export: Export current note to Confluence from the command palette.
  • Or click the cloud icon in the ribbon.

After a successful export, the plugin writes the Confluence page ID back to the note's frontmatter as confluence_page_id. Re-exporting the same note will update the existing page.

Export a folder

Right-click any folder in the file browser and choose Export folder to Confluence. The plugin walks the folder tree recursively, creating a Confluence page for each folder and exporting each note as a child page. A summary notice reports how many pages were created, updated, or failed.

Frontmatter reference

All settings can be overridden on a per-note basis using frontmatter keys:

KeyTypeDescription
confluence_page_idstringWritten automatically after the first export. Reused for all subsequent updates.
confluence_space_keystringOverride the default space for this note.
confluence_parent_idstringOverride the default parent page for this note.
confluence_titlestringOverride the page title (defaults to the note filename).
confluence_image_widthnumberOverride the image display width in pixels.
confluence_overwritebooleanSet to true to overwrite an existing page by title, even if the global toggle is off.

Example:

---
confluence_space_key: ENG
confluence_parent_id: "987654"
confluence_title: "Q2 Architecture Decision"
confluence_image_width: 1200
confluence_overwrite: true
---

Development

# Install dependencies
npm install

# Build in watch mode
npm run dev

# Production build
npm run build

# Run tests
npm test

The compiled main.js is excluded from version control. Copy it along with manifest.json into your vault's plugin folder to test locally.

License

MIT. See LICENSE.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.