Interactive Jupyter notebooks for exploring the Kotlin Notion Client library. These provide hands-on examples and serve as an alternative way to understand and test the library's capabilities.
Set these before running the notebooks:
export NOTION_API_TOKEN="secret_your_token_here"
export NOTION_TEST_PAGE_ID="12345678-1234-1234-1234-123456789abc"
export NOTION_TEST_DATABASE_ID="87654321-4321-4321-4321-cba987654321"- Create an integration at https://www.notion.so/my-integrations
- Copy the "Internal Integration Token"
- Create test page(s) and database(s) in your Notion workspace
- Share them with your integration (Share → Invite → select your integration)
Introduction to the library: authentication, retrieving pages, basic error handling.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_PAGE_ID
Working with databases and data sources: querying, filtering, sorting.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_DATABASE_ID
Creating pages programmatically with various property types using the DSL.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_DATABASE_ID
Building page content: block hierarchy, nesting, different block types.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_PAGE_ID
Text formatting with the Rich Text DSL: annotations, links, mentions, equations.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_PAGE_ID
Advanced querying: complex nested filters, multiple sorts, pagination.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_DATABASE_ID
Uploading files, external imports, media blocks.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_PAGE_ID
Tour of all breaking changes and new features in v0.4.0: trash API, Markdown Content API, Views API, new block types, native icons, relative date filters, and more.
Prerequisites: NOTION_API_TOKEN, NOTION_TEST_PAGE_ID, NOTION_TEST_DATABASE_ID
- All notebooks use v0.4.1 and
runBlocking { }to wrap suspend functions - Notebooks are designed to be modified and experimented with
- Use a test workspace, not your production Notion workspace
- Run each cell in order; set the required environment variables before starting