Confluence To Markdown

Action ID: confluence:transform:markdown
NPM Package:

@backstage/plugin-scaffolder-backend-module-confluence-to-markdown

Description

Transforms Confluence content to Markdown

Input Schema

PropertyTypeDescriptionRequired
repoUrlstringmkdocs.yml file location inside the github repo you want to store the document
confluenceUrlsarrayPaste your Confluence url. Ensure it follows this format: https://{confluence+base+url}/display/{spacekey}/{page+title} or https://{confluence+base+url}/spaces/{spacekey}/pages/1234567/{page+title} for Confluence Cloud

Output Schema

PropertyTypeDescriptionRequired
repostringRepository name
ownerstringRepository owner

Usage Examples

Convert a single Confluence Cloud page to Markdown and update a TechDocs repo

Converts one Confluence Cloud page to Markdown and updates the TechDocs site defined by mkdocs.yml in a GitHub repo. Use this when migrating a single document like a service runbook as part of a template that also sets up project files with fetch:template.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./skeleton
      targetPath: .
      values:
        name: ${{ parameters.name }}
        owner: ${{ parameters.owner }}

  - id: transformDocs
    action: confluence:transform:markdown
    input:
      confluenceUrls:
        - "https://acme.atlassian.net/wiki/spaces/ENG/pages/1234567/Service+Runbook"
      repoUrl: ${{ parameters.techdocsRepoUrl }}

Import multiple Confluence pages into a centralized docs repo

Converts multiple Confluence pages from different spaces to Markdown and pushes them to a central docs repository that hosts a shared mkdocs site. Use this for bulk migration from Confluence Server and Cloud.

Copy
steps:
  - id: fetchScaffold
    action: fetch:template
    input:
      url: ./templates/docs-base
      targetPath: .
      values:
        system: "engineering"
        documentationSet: "platform"

  - id: transformBulkDocs
    action: confluence:transform:markdown
    input:
      confluenceUrls:
        - "https://confluence.internal/display/OPS/Oncall+Guide"
        - "https://acme.atlassian.net/wiki/spaces/ENG/pages/998877665/ADR+0001+Service+Architecture"
        - "https://confluence.internal/display/QA/Release+Checklist"
      repoUrl: "github.com?owner=acme-corp&repo=developer-docs&branch=main&path=docs/mkdocs.yml"