Files

Confluence Bot

A standalone toolkit for analyzing and maintaining Confluence spaces. Clone this repo, configure your Confluence instance, and use the scripts to export, push, read, check, and reorganize pages.

Features

  • Export — Full page tree export (HTML + Markdown + JSON index)
  • Push — Create/update pages from local Markdown files with automatic Umlaut handling
  • Read — Read specific pages and their children
  • Check — Verify which pages exist under a parent
  • Reorganize — Move pages into a category structure
  • Delete — Remove test/draft pages

Quick Start

1. Clone and configure

git clone https://github.com/DoctoDre/Confluence_Bot.git my-confluence-project
cd my-confluence-project
cp .secrets.example .secrets
# Edit .secrets with your Confluence PAT

2. Set your Confluence details

Edit config.ps1:

$ConfluenceUrl = "https://your-confluence.example.com"
$SpaceKey      = "YOUR_SPACE"
$RootPageId    = "123456789"  # The root page ID to work under

3. Run scripts

# Export entire page tree
powershell -ExecutionPolicy Bypass -File scripts/confluence-export.ps1

# Push local markdown as pages
powershell -ExecutionPolicy Bypass -File scripts/confluence-push.ps1

# Check what pages exist
powershell -ExecutionPolicy Bypass -File scripts/confluence-check.ps1

# Read specific pages
powershell -ExecutionPolicy Bypass -File scripts/confluence-read.ps1

# Reorganize pages into categories
powershell -ExecutionPolicy Bypass -File scripts/confluence-reorganize.ps1

Configuration

.secrets file

CONFLUENCE_TOKEN=your_personal_access_token_here

config.ps1

$ConfluenceUrl = "https://your-confluence.example.com"
$SpaceKey      = "MYSPACE"
$RootPageId    = "123456789"
$ApiBase       = "$ConfluenceUrl/rest/api"

For AI Agents

See AGENTS.md for instructions on how to use this repo as an AI agent working on Confluence maintenance tasks.

Setting Up a New Project

See SETUP_NEW_PROJECT.md for step-by-step instructions on cloning this template for a new Confluence space.

License

MIT