Skip to content

rubenvitt/readwise-to-mem.ai-exporter-using-notion

Repository files navigation

Readwise to mem.ai Exporter

This app exports Readwise highlights from Notion to mem.ai using their APIs.

Unfortunately, there is still no official integration today, so you need to your own custom exporter like this one.

Run & go

  1. Prepare .env (see below)

  2. docker compose up -d

Prerequisites

Services

  • Readwise account (the source of your highlights).

  • Notion account (this app uses a Notion database for synchronization).

  • mem.ai account (this app exports highlights to mem.ai, so…​ you need a mem.ai account)

Readwise

Please set up a Notion integration to Notion.

Notion

  • You need to create a custom integration. Copy the access token to ./.envNOTION_TOKEN

  • Open the Readwise database…​

    • create a new select property with a name of memai-sync-status (or a custom one, you may define a different name as NOTION_SYNC_STATUS in ./env) with a possible status SYNCED

    • create a new text property with a name of memai-sync-id (or a custom one, you may define a different name as NOTION_SYNC_ID in ./env)

    • create a new date property with a name of memai-last-sync (or a custom one, you may define a different name as NOTION_LAST_SYNC in ./env)

mem.ai

You need to create an API token. Copy it to ./envMEM_TOKEN

Configuration

#required
NOTION_TOKEN=your Notion token
MEM_TOKEN=your mem.ai token
NOTION_DATABASE_ID=the Readwise database id

# optional
NOTION_SYNC_ID=database property name ?? memai-sync-id
NOTION_SYNC_STATUS=database property name ?? memai-sync-status
NOTION_LAST_SYNC=database property name ?? memai-last-sync
CRON_SCHEDULE=schedule of exporter-run ?? */15 * * * *

MAPPING_ARTICLES=convert 'Articles' to ?? article
MAPPING_BOOKS=convert 'Books' to ?? book
MAPPING_TWEETS=convert 'Tweets' to ?? tweet
MAPPING_PODCASTS=convert 'Podcasts' to ?? podcast
DEFAULT_TAGS=tags for each imported item ?? #readwise-import

Installation

pnpm install or docker build -t <tag-name> . or docker compose build

Run app

From Hub

docker compose up -d

Local Docker file

pnpm start or docker run <tag-name> -d --rm or docker compose up -d --build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages