A walkthrough of setting up Notion to work with this library.
- Visit https://www.notion.so/my-integrations
- Click + New integration
- Fill in:
- Name: anything (e.g. "Bumba")
- Associated workspace: pick yours
- Logo: optional
- Click Submit
- Copy the Internal Integration Token — starts with
secret_orntn_
Save the token to your .env:
NOTION_API_KEY=secret_…
Security note: never commit
.env. The included.gitignorealready excludes it.
On the integration's settings page, leave these enabled (default):
- Read content
- Update content
- Insert content
You can disable comment-related capabilities — the library doesn't use them.
The integration has zero access until you explicitly share pages with it.
- In Notion, create a page (e.g. "Bumba Projects")
- Click Share in the top-right corner
- Click Invite
- Search for your integration's name and select it
- Click Invite
The integration can now read and write under this page.
You can also share specific pages on a per-project basis. The dedicated parent approach is simpler.
- Open the parent page in Notion
- Click the … menu → Copy link
- The URL looks like
https://www.notion.so/My-Page-<32-char-hex-id>?v=… - The ID is the 32-char hex (or hyphenated UUID) at the end
Add it to .env:
NOTION_PARENT_PAGE_ID=<your-id>
npx notion-github-sync verifyIf you see Connected as: … and Parent page is accessible, you're done.
The page (or one of its ancestors) wasn't shared with the integration. Re-share via the Share menu.
The token is wrong, was revoked, or has whitespace around it. Regenerate at https://www.notion.so/my-integrations and update .env.
Either:
- The integration lacks the Insert content capability, or
- The parent page wasn't shared with it
Notion's API caps you at ~3 requests/second. The library handles this automatically with retries. If you see this, you're probably making parallel calls outside NotionClient — route them through it.
The publisher creates Notion pages and databases under your shared parent page. It will not modify pages outside that subtree. Each database created via createPMDatabase() uses one of these schemas:
- Tasks: Name, Status, Priority, Assignee, Due Date, GitHub Issue, GitHub Number, Labels, Last Synced
- Sprints: Name, Status, Start Date, End Date, Goal, Story Points
- Epics: Name, Status, Description, Owner, Target Date
- Projects: Name, Status, Description, Owner, Repository