Notion Component

Manage Notion pages, databases, and users
Component key: notion
Description
Notion is a productivity and note-taking web application developed by Notion Labs Inc. It offers organizational tools including task management, project tracking, to-do lists, bookmarking, and more.
Connections
Notion OAuth 2.0 Connection
To create an OAuth 2.0 app in Notion, visit notion.so/my-integrations and create a new integration. Take note of your integration's OAuth client ID and OAuth client secret and enter those values when you add a Notion connection to your flow. Under the Distribution page, add the callback URL,
https://oauth2.prismatic.io/callback
Input | Default | Notes | Example |
---|---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://api.notion.com/v1/oauth/authorize?owner=user | The OAuth 2.0 Authorization URL for Notion | |
Client ID string / Required clientId | Client Identifier of your app for the API | secret_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
Client Secret password / Required clientSecret | Client Secret of your app for the API | 00000000-0000-0000-0000-000000000000 | |
Scopes string Hidden Field scopes | Scopes are not used for Notion | ||
Token URL string / Required Hidden Field tokenUrl | https://api.notion.com/v1/oauth/token | The OAuth 2.0 Token URL for Notion |
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. | key: createDatabase
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Properties code / Required databaseProperties | Property schema of database. The keys are the names of properties as they appear in Notion. | |
Title code databaseTitle | Title of database as it appears in Notion. | |
Parent code / Required parent | A page parent |
{
"data": {
"object": "database",
"id": "bc1211ca-e3f1-4939-ae34-5260b16f627c",
"created_time": "2021-07-08T23:50:00.000Z",
"last_edited_time": "2021-07-08T23:50:00.000Z",
"icon": {
"type": "emoji",
"emoji": "🎉"
},
"cover": {
"type": "external",
"external": {
"url": "https://website.domain/images/image.png"
}
},
"url": "https://www.notion.so/bc1211cae3f14939ae34260b16f627c",
"title": [
{
"type": "text",
"text": {
"content": "Grocery List",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Grocery List",
"href": null
}
],
"properties": {
"+1": {
"id": "Wp%3DC",
"name": "+1",
"type": "people",
"people": {}
},
"In stock": {
"id": "fk%5EY",
"name": "In stock",
"type": "checkbox",
"checkbox": {}
},
"Price": {
"id": "evWq",
"name": "Price",
"type": "number",
"number": {
"format": "dollar"
}
},
"Description": {
"id": "V}lX",
"name": "Description",
"type": "rich_text",
"rich_text": {}
},
"Last ordered": {
"id": "eVnV",
"name": "Last ordered",
"type": "date",
"date": {}
},
"Meals": {
"id": "%7DWA~",
"name": "Meals",
"type": "relation",
"relation": {
"database_id": "668d797c-76fa-4934-9b05-ad288df2d136",
"single_property": {}
}
},
"Number of meals": {
"id": "Z\\Eh",
"name": "Number of meals",
"type": "rollup",
"rollup": {
"rollup_property_name": "Name",
"relation_property_name": "Meals",
"rollup_property_id": "title",
"relation_property_id": "mxp^",
"function": "count"
}
},
"Store availability": {
"id": "s}Kq",
"name": "Store availability",
"type": "multi_select",
"multi_select": {
"options": [
{
"id": "cb79b393-d1c1-4528-b517-c450859de766",
"name": "Duc Loi Market",
"color": "blue"
},
{
"id": "58aae162-75d4-403b-a793-3bc7308e4cd2",
"name": "Rainbow Grocery",
"color": "gray"
},
{
"id": "22d0f199-babc-44ff-bd80-a9eae3e3fcbf",
"name": "Nijiya Market",
"color": "purple"
},
{
"id": "0d069987-ffb0-4347-bde2-8e4068003dbc",
"name": "Gus's Community Market",
"color": "yellow"
}
]
}
},
"Photo": {
"id": "yfiK",
"name": "Photo",
"type": "files",
"files": {}
},
"Food group": {
"id": "CM%3EH",
"name": "Food group",
"type": "select",
"select": {
"options": [
{
"id": "6d4523fa-88cb-4ffd-9364-1e39d0f4e566",
"name": "🥦Vegetable",
"color": "green"
},
{
"id": "268d7e75-de8f-4c4b-8b9d-de0f97021833",
"name": "🍎Fruit",
"color": "red"
},
{
"id": "1b234a00-dc97-489c-b987-829264cfdfef",
"name": "💪Protein",
"color": "yellow"
}
]
}
},
"Name": {
"id": "title",
"name": "Name",
"type": "title",
"title": {}
}
},
"parent": {
"type": "page_id",
"page_id": "98ad959b-2b6a-4774-80ee-00246fb0ea9b"
},
"archived": false
}
}
Create Database Item
Creates an Item on a database. | key: createDatabaseItem
Input | Default | Notes |
---|---|---|
Children code children | The content to be rendered on the new page, represented as an array of block objects. https://developers.notion.com/reference/block | |
Connection connection / Required connection | ||
Cover Image code coverImage | The cover image of the new page, represented as a file object. | |
Icon code icon | The 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) | |
Parent code / Required parent | The parent database where the new page is inserted, represented as a JSON object with a database_id key, and the corresponding ID. | |
Properties code / Required properties | The 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. |
Create Page
Creates a new page that is a child of an existing page or database. | key: createPage
Input | Default | Notes |
---|---|---|
Children code children | The content to be rendered on the new page, represented as an array of block objects. https://developers.notion.com/reference/block | |
Connection connection / Required connection | ||
Cover Image code coverImage | The cover image of the new page, represented as a file object. | |
Icon code icon | The 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) | |
Parent code / Required parent | The parent page where the new page is inserted, represented as a JSON object with a page_id and the corresponding ID. | |
Properties code / Required properties | The 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. |
{
"data": {
"object": "page",
"id": "59833787-2cf9-4fdf-8782-e53db20768a5",
"created_time": "2022-03-01T19:05:00.000Z",
"last_edited_time": "2022-07-06T19:16:00.000Z",
"created_by": {
"object": "user",
"id": "ee5f0f84-409a-440f-983a-a5315961c6e4"
},
"last_edited_by": {
"object": "user",
"id": "ee5f0f84-409a-440f-983a-a5315961c6e4"
},
"cover": {
"type": "external",
"external": {
"url": "https://upload.wikimedia.org/wikipedia/commons/6/62/Tuscankale.jpg"
}
},
"icon": {
"type": "emoji",
"emoji": "🥬"
},
"parent": {
"type": "database_id",
"database_id": "d9824bdc-8445-4327-be8b-5b47500af6ce"
},
"archived": false,
"properties": {
"Store availability": {
"id": "%3AUPp"
},
"Food group": {
"id": "A%40Hk"
},
"Price": {
"id": "BJXS"
},
"Responsible Person": {
"id": "Iowm"
},
"Last ordered": {
"id": "Jsfb"
},
"Cost of next trip": {
"id": "WOd%3B"
},
"Recipes": {
"id": "YfIu"
},
"Description": {
"id": "_Tc_"
},
"In stock": {
"id": "%60%5Bq%3F"
},
"Number of meals": {
"id": "zag~"
},
"Photo": {
"id": "%7DF_L"
},
"Name": {
"id": "title"
}
},
"url": "https://www.notion.so/Tuscan-Kale-598337872cf94fdf8782e53db20768a5"
}
}
Get Current User
Get the currently logged in user | key: getCurrentUser
Input | Notes |
---|---|
Connection connection / Required connection |
Get Database
Retrieve a database by ID | key: getDatabase
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Database ID string / Required databaseId | 00000000-0000-0000-0000-000000000000 |
Get Page
Retrieve a page by ID with optional property filters | key: getPage
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Filter Properties string filterProperties | A list of page property value IDs separated by commas. Use this to limit the response to specific page properties. | propertyID1,propertyID2 |
Page ID string / Required pageId | 00000000-0000-0000-0000-000000000000 |
Get User by ID
Get a user by their ID | key: getUser
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
User ID string / Required userId | 00000000-0000-0000-0000-000000000000 |
List Databases
List all databases | key: listDatabases
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Fetch All boolean fetchAll | false | Turn this on to fetch all pages. This will ignore the start cursor input. | |
Start Cursor string startCursor | The start cursor is returned from a previous 'list' action when at least one more page of records is available. | 00000000-0000-0000-0000-000000000000 |
List Pages
List all pages | key: listPages
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Fetch All boolean fetchAll | false | Turn this on to fetch all pages. This will ignore the start cursor input. | |
Start Cursor string startCursor | The start cursor is returned from a previous 'list' action when at least one more page of records is available. | 00000000-0000-0000-0000-000000000000 |
List Users
List all users in the workspace with optional page size | key: listUsers
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Fetch All boolean fetchAll | false | Turn this on to fetch all pages. This will ignore the start cursor and page size inputs. | |
Page Size string pageSize | 50 | The number of items from the full list desired in the response. Maximum: 100. | 100 |
Start Cursor string startCursor | The start cursor is returned from a previous 'list' action when at least one more page of records is available. | 00000000-0000-0000-0000-000000000000 |
Query Database
Query a Notion database | key: queryDatabase
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Database ID string / Required databaseId | 00000000-0000-0000-0000-000000000000 | |
Filter Object code filter |
Raw Request
Send raw HTTP request to Notion | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. Specify 0 for no retries. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A 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. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If 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. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | Input the path only (/pages), The base URL is already included (https://api.notion.com/v1). For example, to connect to https://api.notion.com/v1/pages, only /pages is entered in this field. | /pages | |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. |