Version v1.0.6

Notion

This integration is not yet stable

This integration is currently in beta and has not yet reached a stable release. Do not rely on it for production use cases yet.

See the section “Limitations and considerations” below for more details.

The Notion integration allows you to back up and restore your Notion pages or entire workspace into a Kloset store using the official Notion API.

All content is fetched via the API and stored as structured JSON, including page metadata, content blocks, and hierarchical relationships.

The Notion integration package for Plakar provides two connectors:

Connector typeDescription
Source connectorBack up a Notion workspace into a Kloset store.
Destination connectorRestore a Notion workspace from a Kloset store.

Installation

The Notion Plakar package can be installed either by downloading a pre-built package or by building it from source.

Plakar provides pre-compiled packages for common platforms. This is the simplest installation method and is suitable for most users.

Note: Installing pre-built packages requires authentication with Plakar. See Login to Plakar to unlock features.

Install the Notion package:

$ plakar pkg add notion

Verify the installation:

$ plakar pkg list

Connectors

The Notion package provides a source and a destination connector.

Source connector

The Notion workspace is fetched from the Notion API and stored as structured JSON in a Kloset store, including page metadata, content blocks, and hierarchical relationships.

flowchart LR subgraph Source[Notion] fs@{ shape: cloud, label: "data" } end subgraph Plakar[Plakar] Connector@{ shape: rect, label: "Retrieve data via
Notion source connector" } Transform@{ shape: rect, label: "Transform data as a structured JSON document" } Connector --> Transform end Source --> Connector Store@{ shape: cyl, label: "Kloset Store" } Transform --> Store %% Apply classes class Source sourceBox class Plakar brandBox class Store storeBox %% Classes definitions classDef sourceBox fill:#ffe4e6,stroke:#cad5e2,stroke-width:1px classDef brandBox fill:#524cff,color:#ffffff classDef storeBox fill:#dbeafe,stroke:#cad5e2,stroke-width:1px linkStyle default stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;

Requirements

Configure

# Create a Notion source configuration
$ plakar source add mynotion location=notion:// token=$NOTION_API_TOKEN

# Back up the Notion workspace to the Kloset store on the filesystem
$ plakar at /var/backups backup "@mynotion"

Options

These options can be set when configuring the source connector with plakar source add or plakar source set:

OptionPurpose
locationmandatory: Must be set to the string notion://
tokenmandatory: Your Notion API token (ntn_xxx)

Destination connector

The destination connector fetches data from the structured JSON stored by the source connector, and pushes it to the Notion API to recreate pages and content blocks.

flowchart LR Store@{ shape: cyl, label: "Kloset Store" } subgraph Plakar[Plakar] Transform@{ shape: rect, label: "Reconstruct data from structured JSON document" } Connector@{ shape: rect, label: "Restore data via
Notion destination connector" } Transform --> Connector end Store --> Transform subgraph Destination[Notion] fs@{ shape: cloud, label: "data" } end Connector --> Destination %% Apply classes class Destination destinationBox class Plakar brandBox class Store storeBox %% Classes definitions classDef destinationBox fill:#d0fae5,stroke:#cad5e2,stroke-width:1px classDef brandBox fill:#524cff,color:#ffffff classDef storeBox fill:#dbeafe,stroke:#cad5e2,stroke-width:1px linkStyle default stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;

Requirements

  • A valid Notion API token (ntn_xxx) with permission to create pages and blocks in the target workspace.

Configure

# Create a Notion destination configuration
$ plakar destination add mynotion location=notion:// token=$NOTION_API_TOKEN

# Set the rootID option to specify the Notion Page ID where to restore the content
$ plakar destination set mynotion rootID=$NOTION_PAGE_ID

# Restore the snapshot to the Notion workspace
$ plakar at /var/backups restore -to "@mynotion" <snapshot_id>

Options

These options can be set when configuring the destination connector with plakar destination add or plakar destination set:

OptionPurpose
locationmandatory: Must be set to the string notion://
tokenmandatory: Your Notion API token (ntn_xxx) with permission to create pages and blocks in the target workspace, and shared with the target parent page
rootIDmandatory: Notion Page ID under which restored content will be created

Note: check the URL to get the rootID parameter. For example, in the URL https://www.notion.so/MyNotionPageName-1234567890abcdef1234567890abcdef the rootID is 1234567890abcdef1234567890abcdef.


Limitations and considerations

  • The destination connector is currently under development and requires more love and testing to work.