Skip to main content

Notion Connector

Notion Manage Notion pages, databases, and users

Connections

Internal Integration Secret

Connect to Notion using an Internal Integration Secret

To create an internal integration for Notion, you'll set up a private integration that works within the own workspace.

  1. Visit notion.so/my-integrations and log into Notion
  2. Click Create new integration
  3. Fill in the integration details:
  4. Under Capabilities, select the permissions needed:
    • Read content: To read pages, databases, and other content
    • Update content: To modify existing content
    • Insert content: To create new content
  5. Under Content Capabilities, choose specific content types if needed
  6. Save the integration settings
Get the Integration Token:
  1. In the Secrets tab, copy the Internal Integration Token
  2. Enter this token when configuring the Notion connection

Connect to Content:

After creating the integration, you'll need to connect it to specific pages or databases:

  1. Go to the Notion page or database you want to access
  2. Click the ... menu in the top right corner
  3. Select Connect to and choose the integration
  4. The integration will now have access to that content based on the capabilities you selected
InputCommentsDefault
Internal Integration SecretYour Notion Internal Integration Secret

OAuth 2.0

Connect to Notion via OAuth 2.0

To create an OAuth 2.0 integration for Notion, you'll set up a public integration that allows users to authenticate with their Notion workspaces.

  1. Visit notion.so/my-integrations and log into Notion
  2. Click Create new integration
  3. Fill in the integration details:
  4. Under Capabilities, select the permissions needed:
    • Read content: To read pages, databases, and other content
    • Update content: To modify existing content
    • Insert content: To create new content
  5. Under Content Capabilities, choose specific content types if needed
  6. Save the integration settings

Configure OAuth Settings:

  1. Navigate to the Distribution page in the integration settings
  2. Select Public integration to enable OAuth
  3. Add the callback URL: https://oauth2.integrations.acme.com/callback
  4. Configure additional OAuth settings as needed

Get OAuth Credentials:

  1. In the Secrets tab, find the OAuth credentials:
    • OAuth client ID: Copy this value
    • OAuth client secret: Copy this value
  2. Enter these values when you add a Notion connection to the flow

User Authorization Flow:

When users connect their Notion workspace:

  1. They'll be redirected to Notion's OAuth authorization page
  2. Users select which pages/databases to share with the integration
  3. After authorization, the integration will have access to the selected content based on the capabilities you configured

This connection uses OAuth 2.0, a common authentication mechanism for integrations. Read about how OAuth 2.0 works here.

InputCommentsDefault
Client IDClient Identifier of your app for the API
Client SecretClient Secret of your app for the API

Actions

Create Database

Creates a database as a subpage in the specified parent page, with the specified properties schema. Currently, the parent of a new database must be a Notion page or a wiki database.

InputCommentsDefault
Connection
ParentA page parent
{
"database_id": "d9824bdc84454327be8b5b47500af6ce"
}
TitleTitle of database as it appears in Notion.
[
{
"type": "text",
"text": {
"content": "Some words ",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Some words ",
"href": null
}
]
PropertiesProperty schema of database. The keys are the names of properties as they appear in Notion.
{
"Name": {
"title": {}
},
"Description": {
"rich_text": {}
},
"In stock": {
"checkbox": {}
},
"Food group": {
"select": {
"options": [
{
"name": "🥦Vegetable",
"color": "green"
},
{
"name": "🍎Fruit",
"color": "red"
},
{
"name": "💪Protein",
"color": "yellow"
}
]
}
},
"Price": {
"number": {
"format": "dollar"
}
},
"Last ordered": {
"date": {}
},
"Meals": {
"relation": {
"database_id": "668d797c-76fa-4934-9b05-ad288df2d136",
"single_property": {}
}
},
"Number of meals": {
"rollup": {
"rollup_property_name": "Name",
"relation_property_name": "Meals",
"function": "count"
}
},
"Store availability": {
"type": "multi_select",
"multi_select": {
"options": [
{
"name": "Duc Loi Market",
"color": "blue"
},
{
"name": "Rainbow Grocery",
"color": "gray"
},
{
"name": "Nijiya Market",
"color": "purple"
},
{
"name": "Gus'''s Community Market",
"color": "yellow"
}
]
}
},
"+1": {
"people": {}
},
"Photo": {
"files": {}
}
}

Create Database Item

Creates an Item on a database.

InputCommentsDefault
Connection
ParentThe parent database where the new page is inserted, represented as a JSON object with a database_id key, and the corresponding ID.
{
"database_id": "d9824bdc84454327be8b5b47500af6ce"
}
PropertiesThe values of the page's properties. If the parent is a database, then the schema must match the parent database's properties. If the parent is a page, then the only valid object key is title.
{
"Name": {
"title": [
{
"text": {
"content": "Tuscan kale"
}
}
]
},
"Description": {
"rich_text": [
{
"text": {
"content": "A dark green leafy vegetable"
}
}
]
},
"Food group": {
"select": {
"name": "🥬 Vegetable"
}
}
}
ChildrenThe content to be rendered on the new page, represented as an array of block objects. https://developers.notion.com/reference/block
[
{
"object": "block",
"heading_2": {
"rich_text": [
{
"text": {
"content": "Lacinato kale"
}
}
]
}
},
{
"object": "block",
"paragraph": {
"rich_text": [
{
"text": {
"content": "Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.",
"link": {
"url": "https://en.wikipedia.org/wiki/Lacinato_kale"
}
},
"href": "https://en.wikipedia.org/wiki/Lacinato_kale"
}
],
"color": "default"
}
}
]
IconThe icon of the new page. Either an emoji object (https://developers.notion.com/reference/emoji-object) or an external file object (https://developers.notion.com/reference/file-object)
{
"type": "external",
"external": {
"url": "https://images.unsplash.com/photo-1525310072745-f49212b5ac6d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1065&q=80"
}
}
Cover ImageThe cover image of the new page, represented as a file object.
{
"type": "file",
"file": {
"url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/7b8b0713-dbd4-4962-b38b-955b6c49a573/My_test_image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221024%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20221024T205211Z&X-Amz-Expires=3600&X-Amz-Signature=208aa971577ff05e75e68354e8a9488697288ff3fb3879c2d599433a7625bf90&X-Amz-SignedHeaders=host&x-id=GetObject",
"expiry_time": "2022-10-24T22:49:22.765Z"
}
}

Create Page

Creates a new page that is a child of an existing page or database.

InputCommentsDefault
Connection
ParentThe parent page where the new page is inserted, represented as a JSON object with a page_id and the corresponding ID.
{
"page_id": "d9824bdc84454327be8b5b47500af6ce"
}
PropertiesThe values of the page's properties. If the parent is a database, then the schema must match the parent database's properties. If the parent is a page, then the only valid object key is title.
{
"Name": {
"title": [
{
"text": {
"content": "Tuscan kale"
}
}
]
},
"Description": {
"rich_text": [
{
"text": {
"content": "A dark green leafy vegetable"
}
}
]
},
"Food group": {
"select": {
"name": "🥬 Vegetable"
}
}
}
ChildrenThe content to be rendered on the new page, represented as an array of block objects. https://developers.notion.com/reference/block
[
{
"object": "block",
"heading_2": {
"rich_text": [
{
"text": {
"content": "Lacinato kale"
}
}
]
}
},
{
"object": "block",
"paragraph": {
"rich_text": [
{
"text": {
"content": "Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.",
"link": {
"url": "https://en.wikipedia.org/wiki/Lacinato_kale"
}
},
"href": "https://en.wikipedia.org/wiki/Lacinato_kale"
}
],
"color": "default"
}
}
]
IconThe icon of the new page. Either an emoji object (https://developers.notion.com/reference/emoji-object) or an external file object (https://developers.notion.com/reference/file-object)
{
"type": "external",
"external": {
"url": "https://images.unsplash.com/photo-1525310072745-f49212b5ac6d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1065&q=80"
}
}
Cover ImageThe cover image of the new page, represented as a file object.
{
"type": "file",
"file": {
"url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/7b8b0713-dbd4-4962-b38b-955b6c49a573/My_test_image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221024%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20221024T205211Z&X-Amz-Expires=3600&X-Amz-Signature=208aa971577ff05e75e68354e8a9488697288ff3fb3879c2d599433a7625bf90&X-Amz-SignedHeaders=host&x-id=GetObject",
"expiry_time": "2022-10-24T22:49:22.765Z"
}
}

Get Current User

Get the currently logged in user

InputCommentsDefault
Connection

Get Database

Retrieve a database by ID

InputCommentsDefault
Connection
Database ID

Get Page

Retrieve a page by ID with optional property filters

InputCommentsDefault
Connection
Page ID
Filter PropertiesA list of page property value IDs separated by commas. Use this to limit the response to specific page properties.

Get User by ID

Get a user by their ID

InputCommentsDefault
Connection
User ID

List Databases

List all databases

InputCommentsDefault
Connection
Start CursorThe start cursor is returned from a previous 'list' action when at least one more page of records is available.
Fetch AllTurn this on to fetch all pages. This will ignore the start cursor input.false

List Pages

List all pages

InputCommentsDefault
Connection
Start CursorThe start cursor is returned from a previous 'list' action when at least one more page of records is available.
Fetch AllTurn this on to fetch all pages. This will ignore the start cursor input.false

List Users

List all users in the workspace with optional page size

InputCommentsDefault
Connection
Start CursorThe start cursor is returned from a previous 'list' action when at least one more page of records is available.
Page SizeThe number of items from the full list desired in the response. Maximum: 100.50
Fetch AllTurn this on to fetch all pages. This will ignore the start cursor and page size inputs.false

Query Database

Query a Notion database

InputCommentsDefault
Connection
Database ID
Filter Object

Raw Request

Send raw HTTP request to Notion

InputCommentsDefault
Connection
URLInput the path only (/users/me), The base URL is already included (https://api.notion.com/v1). For example, to connect to https://api.notion.com/v1/users/me, only /users/me is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false