* Add OAuth public integration guide to README and bump to 0.1.11 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Add folder scope setting for Notion sync Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| src | ||
| tests | ||
| wiki | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| esbuild.config.mjs | ||
| LICENSE | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| versions.json | ||
| vitest.config.ts | ||
Akbun Notion Sync
Desktop-only Obsidian plugin that syncs every markdown note in your vault to Notion as child pages of a parent page.
How it works
- Walks the whole vault, hashes each note with sha256, and compares against the last synced state (
~/.config/akbun-notion-sync/sync-state.json). - New notes are created as Notion pages, changed notes are updated in place, and notes deleted from the vault are archived in Notion.
- Notion API calls are throttled to 3 requests per second, and progress is shown via Obsidian notices.
Authentication
Two options, selectable in the settings tab:
- Integration token — paste an internal integration secret from notion.so/my-integrations. Remember to share the parent page with the integration.
- OAuth — enter your public integration's client ID and secret, register
http://localhost:43110/callbackas its redirect URI, then click Connect. Your browser opens Notion's consent page and the plugin receives the code on a temporary localhost server.
Credentials are stored in ~/.config/akbun-notion-sync/credentials.json with 0600 permissions — never inside the vault, so syncing your vault with git or cloud storage cannot leak tokens.
OAuth public integration guide
Notion's OAuth flow requires your own public integration — Notion does not support a client-less (PKCE-only) flow, so a client ID and secret are always needed. Set one up once:
-
Open notion.so/my-integrations and click New integration.
-
Under Type, choose Public. Fill in the required fields (name, company/website, privacy policy and terms URLs — personal links are fine for private use).
-
In Redirect URIs, add exactly:
http://localhost:43110/callbackThe plugin listens on this port only while the Connect button is waiting for the callback.
-
Save, then copy the OAuth client ID and OAuth client secret from the integration's Configuration tab.
-
In Obsidian, open the plugin settings, select OAuth as the authentication method, paste the client ID and secret, and click Connect.
-
Your browser opens Notion's consent page. Pick the workspace and pages to share (include the parent page you sync into), then approve. The tab will say you can close it, and Obsidian shows a "Connected to Notion" notice.
The client secret and the access token are saved to ~/.config/akbun-notion-sync/credentials.json; you only need the secret again if you reconnect.
If this feels heavy, the Integration token method is simpler for a single personal workspace — create an internal integration, paste its token, and share the parent page with it.
Settings
- Notion parent page ID — the page under which synced notes are created.
- Folders to sync — comma-separated vault folder paths (e.g.
notes, work/projects). Empty syncs the whole vault. Notes outside these folders are never created, updated, or archived — narrowing the scope leaves already-synced Notion pages untouched. - Sync interval (minutes) —
0means manual only; otherwise the vault syncs automatically at that interval. - Sync now — trigger a sync immediately; the last sync time and result are shown next to the button.
Development
npm install
npm run dev # watch build
npm test # vitest unit tests
npm run build # type-check + production bundle (main.js)
Copy main.js and manifest.json into <vault>/.obsidian/plugins/akbun-notion-sync/ to install a local build.