Skip to content

Simple command to create link to download backup of a Notion workspace

License

Notifications You must be signed in to change notification settings

elpassion/notion-backup-link

This branch is 45 commits ahead of, 22 commits behind darobin/notion-backup:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d8eeab8 · Jul 20, 2022

History

73 Commits
Jul 19, 2022
Jul 19, 2022
Jul 20, 2022
Jul 15, 2022
Jul 19, 2022
Jul 14, 2022
Jul 15, 2022
Dec 20, 2020
Jul 19, 2022
Jul 13, 2022
Jul 19, 2022
Jul 14, 2022
Jul 20, 2022
Jul 15, 2022
Jul 14, 2022
Jul 14, 2022
Jul 15, 2022
Jul 13, 2022

Repository files navigation

notion-backup

This is a very simple tool to export a workspace from Notion, designed to work as part of a GitHub workflow.

It reads NOTION_TOKEN and NOTION_SPACE_ID from the environment, and outputs the link to download zip file with html or markdown.

NOTE: if you log out of your account, the NOTION_TOKEN will get invalidated and this process will fail. There isn't anything that I know of that I can do about that until Notion decide to add a backup endpoint to their official API, at which point this will be able to use a proper authentication token.

Prerequisites

  • nodejs

Setup

  1. Get the NOTION_TOKEN and NOTION_SPACE_ID as explained in this blog post.
  2. In project root create .env.local file from .env file and fill in it (for aws see Run locally section).

Usage

$ node notion-backup.js

Parameters

-f --format <format>, html or markdown, default html
-d --debug, print debug messages

Run locally

# Login to aws with awsume
$ awsume [your-role]

# Print and copy credentials to .env.local file
$ env | grep AWS

# Build and run containers
$ npm run docker

About

Simple command to create link to download backup of a Notion workspace

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 50.5%
  • Shell 30.7%
  • TypeScript 15.6%
  • Dockerfile 3.2%