Skip to main content

Introductory

Create a Notion block

In this introductory codebase, start by learning the basics of Notion’s Public API: creating a new block.

Create a linked Notion block

Build on the previous example by creating a block in Notion and adding a link to it.

Create a styled/linked Notion block

Extend the previous example further by styling a block of text that links to an external website.

Get text from any type of block

This integration shows how to get a list of blocks from a Notion page and parse the text from any type of block.

Intermediate

Create a Notion database

Create your first Notion database with a defined set of properties.

Add new pages to a database

Build on the previous example by creating a database and adding new pages to it.

Query pages in a database

Learn how to filter your database rows (pages) after creating them from scratch.

Filter and sort database pages

Filter and sorts pages after adding them to a new database.

Upload files to a page

Create, send, and attach a file upload to a page’s contents and as a comment attachment.

Build a full-stack Notion integration

Learn how to build a Notion integration with an interactive front-end. This codebase is referenced in the Build your first integration guide.

Advanced

Sync Spotify Playlists with Notion

This integration populates a Notion database with track metadata from a Spotify playlist.

Integrate Mailchimp Campaigns with Notion

This integration populates a Notion database with Mailchimp campaign information, including subscriber contact information.

Log Strava Activity in Notion

This integration syncs a Strava athlete’s activity metadata within a Notion database.

Add rows (pages) to an existing database

This integration finds the first database that your bot has access to, and creates correctly-typed random rows of data.

Sync Notion with GitHub issues

This Notion integration syncs GitHub Issues for a specific repo to a Notion database. This example shows a one-way sync — changes in GitHub cause an update in Notion.

Send an email from a Notion trigger

This Notion integration sends an email whenever the Status property of a page in a database is updated. This sample shows how to use Notion to cause an external action. In this case, the integration sends emails using SendGrid’s API.

Sync Notion with GitHub PRs

This Notion integration updates Notion tasks when a linked Github PR is closed/merged. This integration requires the Notion task link be mentioned in the PR description.