Skip to main content

Notion

This connector captures data from Notion into Flow collections via the Notion API.

It is available for use in the Flow web application. For local development or open-source workflows, ghcr.io/estuary/source-notion:dev provides the latest version of the connector as a Docker image. You can also follow the link in your browser to see past image versions.

This connector is based on an open-source connector from a third party, with modifications for performance in the Flow system.

Supported data resources

The following data resources are supported:

By default, each resource is mapped to a Flow collection through a separate binding.

Prerequisites

To use this connector, you'll need a Notion account with an integration created to connect with Flow.

Before you create your integration, choose how you'll authenticate with Notion. There are two ways: using OAuth to sign in directly in the web app, or manually, using an access token. OAuth is recommended in the web app; only manual configuration is supported when using the CLI.

Setup for OAuth authentication

  1. Go to your integrations page and create a new integration.

  2. On the new integration's Secrets page, change the integration type to Public. Fill in the required fields.

Setup for manual authentication

  1. Go to your integrations page and create a new internal integration. Notion integrations are internal by default.

    1. During setup, change User Capabilities from No user information (the default) to Read user information without email address.
  2. Copy the generated token for use in the connector configuration.

Configuration

You configure connectors either in the Flow web app, or by directly editing the catalog specification file. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the Notion source connector.

Properties

Endpoint

The properties in the table below reflect the manual authentication method. If you're working in the Flow web app, you'll use OAuth2, so many of these properties aren't required.

PropertyTitleDescriptionTypeRequired/Default
/credentialsAuthenticate usingPick an authentication method.objectRequired
/credentials/auth_typeAuthentication typeSet to token for manual authenticationstringRequired
/credentials/tokenAccess TokenNotion API access tokenstring
/start_dateStart DateUTC date and time in the format YYYY-MM-DDTHH:MM:SS.000Z. Any data generated before this date will not be replicated. If left blank, the start date will be set to 2 years before the present date.string

Bindings

PropertyTitleDescriptionTypeRequired/Default
/streamStreamNotion resource from which a collection is captured.stringRequired
/syncModeSync ModeSync this resource incrementally, or fully refresh it every runstringRequired

Sample

This sample specification reflects the manual authentication method.

captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-notion:dev
config:
credentials:
auth_type: token
token: {secret}
start_date: 2021-01-25T00:00:00Z
bindings:
- resource:
stream: blocks
syncMode: incremental
target: ${PREFIX}/blocks
{...}