Knowledge Exporter

Turning proprietary SaaS knowledge into a portable, diffable corpus

A provider-abstracted export pipeline that converts Freshdesk Solutions and Confluence content into deterministic Markdown, using SHA-256 comparison so reruns update only what actually changed.

Source hierarchy and article counts stay visible before export, making scope an explicit decision rather than an all-or-nothing sync.
Role
Developer Support Engineer
Stack
Next.js • TypeScript • Freshdesk • Confluence • Markdown • Vitest

The Problem

Support and internal documentation accumulate in SaaS platforms as proprietary HTML — hard to audit, version, migrate, or reuse outside the platform that generated it. Freshdesk and Confluence each hold that knowledge in a different shape, with no built-in path to a portable copy.

The goal wasn't to replace either platform. It was a local, versionable copy of the knowledge inside them — one a rerun could trust, not just repeat.

Two Sources, One Shared Pipeline

Freshdesk and Confluence don't share a data model. There's no AI or LLM anywhere in this pipeline, either — every transformation is deterministic, so the same source content always produces the same Markdown output.

Freshdesk: Category → Folder → Article

A fixed three-level hierarchy. Scope is selected by category, and the folders and articles beneath it export together.

Confluence: Nested Page Tree

Pages nest to arbitrary depth inside a space, mirrored directly in Explore's tree view rather than flattened into fixed levels.

Shared Conversion Utilities

Both providers route through the same HTML-to-Markdown conversion, content-quality cleanup, and stable path/slug generation — but each keeps its own source-traversal logic; there's no single normalized document schema both funnel through first.

Server-Side Credentials Only

API credentials for both providers are handled server-side. Nothing touches the browser.

Explore mirrors Confluence's actual nested hierarchy — though today's export writes those pages flatter inside the space folder rather than preserving the full tree on disk.

Every Rerun Is a Diff, Not a Rewrite

Every export run re-fetches the selected source content from Freshdesk or Confluence — nothing about the fetch itself is incremental. Idempotency lives entirely in the write step: each converted document is content-hashed with SHA-256 and compared against what's already on disk, so unchanged output is skipped rather than rewritten, and only real content changes get written as a create or an update.

Hashing decides what changed. Nothing else does.

The result is a per-run change report — created, updated, skipped, and failed counts, plus the exact list of touched paths — so a rerun is something you can audit, not just trust.

SHA-256 comparison turns a rerun into an actual diff: unchanged files skip cleanly, and only real content changes show up as created or updated.

A Portable, Inspectable Corpus

The export doesn't stay trapped inside a pipeline or a source SaaS platform. Each run writes real files to a local export root — Markdown documents alongside a SUMMARY.md index and a report.json manifest — so the corpus is something you can open, grep, diff, or hand to another tool directly. Provenance for a given run lives in that manifest rather than scattered across individual file frontmatter, keeping the Markdown itself clean and portable.

The finished export is a browsable local Markdown corpus — structured files and rendered content stay inspectable long after the source API call is gone.

A separate tool, Verbatim, can consume Markdown like this as retrievable source material — the two are complementary, not integrated: there's no shared database, live sync, or direct handoff between them today.

Results

  • Two structurally different SaaS sources — Freshdesk and Confluence — export through one deterministic pipeline into portable Markdown.
  • Repeat runs skip unchanged content and touch only what actually changed, instead of rewriting the entire export.
  • Every run produces an auditable change report: created, updated, skipped, and failed counts, with the exact paths touched.
  • Scope, run changes, and the finished export are all inspectable — nothing happens silently.
  • The finished export is a real local filesystem artifact: browsable, greppable, and usable by other tools without depending on the source platform.
  • API credentials for both providers stay server-side; nothing touches the browser.

Technical Summary

Application
Next.js • TypeScript • Vitest
Conversion
HTML → Markdown (Turndown) • Content-quality normalization • Stable path/slug generation • Oversized-content splitting
Providers
Freshdesk Solutions API (paginated) • Confluence Cloud API (paginated) • Server-side credentials
Reliability
SHA-256 idempotent writes • Per-run change reports • Live export progress

What I'd Build Next

Preserve full source hierarchy on export, not just in ExploreRetry/backoff and resumable job state for long-running exportsIncremental source sync, instead of re-fetching on every runAttachment downloading and inter-document link rewriting

Let’s Work Together

Interested in working together or have a question? Reach out and let’s talk!