Notion
Notion is an all-in-one workspace for notes, tasks, wikis, and databases.
Categories: Productivity and Collaboration
Type: notion/v1
Connections
Version: 1
OAuth2 Authorization Code
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| clientId | Client Id | STRING | true | |
| clientSecret | Client Secret | STRING | true |
Connection Setup
Connect Notion to ByteChef using OAuth 2.0 (Authorization Code).
Create a Notion OAuth app
- Open the Notion developer dashboard: https://www.notion.so/my-integrations
- Click + New integration.
- Enter a clear name (for example,
ByteChef Integration), select a workspace, and set the Integration type to Public. - Fill out the remaining required fields (company name, website, email, etc.).
- Add the ByteChef OAuth redirect (callback) URL(s):
- Cloud:
https://app.bytechef.io/callback - Local development:
http://127.0.0.1:5173/callbackorhttp://localhost:5173/callback
- Cloud:
- Click Save, then open Configure integration settings.
- Under Capabilities, enable at minimum:
- Read content
- Update content
- Insert content
- User information including email addresses
- Click Save changes and copy the generated Client ID and Client Secret.
Actions
Add Block to Page
Name: addBlockToPage
Adds a new content block to a page.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Parent Page ID | STRING | true | |
| children | Children | ARRAY Items[{STRING(type), [{STRING(type), {STRING(content)}(text), {STRING(expression)}(equation)}](caption), STRING(url), STRING(url), STRING(expression), BOOLEAN(checked), STRING(color), [{STRING(type), {STRING(content)}(text), {STRING(expression)}(equation)}](rich_text), STRING(language)}] | Child content to append to a container block as an array of block objects. | true |
Example JSON Structure
{
"label" : "Add Block to Page",
"name" : "addBlockToPage",
"parameters" : {
"id" : "",
"children" : [ {
"type" : "",
"caption" : [ {
"type" : "",
"text" : {
"content" : ""
},
"equation" : {
"expression" : ""
}
} ],
"url" : "",
"expression" : "",
"checked" : false,
"color" : "",
"rich_text" : [ {
"type" : "",
"text" : {
"content" : ""
},
"equation" : {
"expression" : ""
}
} ],
"language" : ""
} ]
},
"type" : "notion/v1/addBlockToPage"
}Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Create Database Item
Name: createDatabaseItem
Creates a new item in Notion database.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Database ID | STRING | The ID of the database. | true |
| fields | DYNAMIC_PROPERTIES Depends Onid | true | ||
| content | Content | STRING | The content to append to item. | false |
Example JSON Structure
{
"label" : "Create Database Item",
"name" : "createDatabaseItem",
"parameters" : {
"id" : "",
"fields" : { },
"content" : ""
},
"type" : "notion/v1/createDatabaseItem"
}Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Create Page
Name: createPage
Creates a new page that is a child of an existing page.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Parent page ID | STRING | true | |
| title | Title | STRING | The title of the page. | false |
Example JSON Structure
{
"label" : "Create Page",
"name" : "createPage",
"parameters" : {
"id" : "",
"title" : ""
},
"type" : "notion/v1/createPage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| object | STRING | The type of the object returned. |
| id | STRING | The ID of the page. |
| created_time | STRING | The time the page was created. |
| last_edited_time | STRING | The time the page was last edited. |
| created_by | OBJECT Properties{STRING(object), STRING(id)} | The user who created the page. |
| last_edited_by | OBJECT Properties{STRING(object), STRING(id)} | The user who last edited the page. |
| parent | OBJECT Properties{STRING(type), STRING(page_id)} | The parent of the page. |
| archived | BOOLEAN Optionstrue, false | Whether the page is archived. |
| in_trash | BOOLEAN Optionstrue, false | Whether the page is in the trash. |
| properties | OBJECT Properties{{STRING(id), STRING(type), [{STRING(type), {STRING(content)}(text), {BOOLEAN(bold), BOOLEAN(italic), BOOLEAN(strikethrough), BOOLEAN(underline), BOOLEAN(code), STRING(color)}(annotations), STRING(plain_text)}](title)}(title)} | The properties of the page. |
| url | STRING | The URL of the page. |
| request_id | STRING | The ID of the request. |
Output Example
{
"object" : "",
"id" : "",
"created_time" : "",
"last_edited_time" : "",
"created_by" : {
"object" : "",
"id" : ""
},
"last_edited_by" : {
"object" : "",
"id" : ""
},
"parent" : {
"type" : "",
"page_id" : ""
},
"archived" : false,
"in_trash" : false,
"properties" : {
"title" : {
"id" : "",
"type" : "",
"title" : [ {
"type" : "",
"text" : {
"content" : ""
},
"annotations" : {
"bold" : false,
"italic" : false,
"strikethrough" : false,
"underline" : false,
"code" : false,
"color" : ""
},
"plain_text" : ""
} ]
}
},
"url" : "",
"request_id" : ""
}Get Database
Name: getDatabase
Retrieve database information by database ID.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Database ID | STRING | The ID of the database to retrieve. | true |
Example JSON Structure
{
"label" : "Get Database",
"name" : "getDatabase",
"parameters" : {
"id" : ""
},
"type" : "notion/v1/getDatabase"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| object | STRING | The type of the object returned. |
| id | STRING | The ID of the database. |
| created_time | STRING | The time the page was created. |
| last_edited_time | STRING | The time the page was last edited. |
| url | STRING | The URL of the database. |
| title | ARRAY Items[{STRING(type), {STRING(content)}(text), {BOOLEAN(bold), BOOLEAN(italic), BOOLEAN(strikethrough), BOOLEAN(underline), BOOLEAN(code), STRING(color)}(annotations), STRING(plain_text)}] | |
| parent | OBJECT Properties{STRING(type), STRING(page_id)} | The parent of the database. |
| archived | BOOLEAN Optionstrue, false | Whether the database is archived. |
| is_inline | BOOLEAN Optionstrue, false | |
| public_url | STRING | The public URL of the database. |
Output Example
{
"object" : "",
"id" : "",
"created_time" : "",
"last_edited_time" : "",
"url" : "",
"title" : [ {
"type" : "",
"text" : {
"content" : ""
},
"annotations" : {
"bold" : false,
"italic" : false,
"strikethrough" : false,
"underline" : false,
"code" : false,
"color" : ""
},
"plain_text" : ""
} ],
"parent" : {
"type" : "",
"page_id" : ""
},
"archived" : false,
"is_inline" : false,
"public_url" : ""
}Get Page
Name: getPage
Retrieve page properties using page ID. Response does not contain page content.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Page ID | STRING | The ID of the page to retrieve. | true |
Example JSON Structure
{
"label" : "Get Page",
"name" : "getPage",
"parameters" : {
"id" : ""
},
"type" : "notion/v1/getPage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| object | STRING | The type of the object returned. |
| id | STRING | The ID of the page. |
| created_time | STRING | The time the page was created. |
| last_edited_time | STRING | The time the page was last edited. |
| created_by | OBJECT Properties{STRING(object), STRING(id)} | The user who created the page. |
| last_edited_by | OBJECT Properties{STRING(object), STRING(id)} | The user who last edited the page. |
| parent | OBJECT Properties{STRING(type), STRING(page_id)} | The parent of the page. |
| archived | BOOLEAN Optionstrue, false | Whether the page is archived. |
| in_trash | BOOLEAN Optionstrue, false | Whether the page is in the trash. |
| properties | OBJECT Properties{{STRING(id), STRING(type), [{STRING(type), {STRING(content)}(text), {BOOLEAN(bold), BOOLEAN(italic), BOOLEAN(strikethrough), BOOLEAN(underline), BOOLEAN(code), STRING(color)}(annotations), STRING(plain_text)}](title)}(title)} | The properties of the page. |
| url | STRING | The URL of the page. |
| request_id | STRING | The ID of the request. |
Output Example
{
"object" : "",
"id" : "",
"created_time" : "",
"last_edited_time" : "",
"created_by" : {
"object" : "",
"id" : ""
},
"last_edited_by" : {
"object" : "",
"id" : ""
},
"parent" : {
"type" : "",
"page_id" : ""
},
"archived" : false,
"in_trash" : false,
"properties" : {
"title" : {
"id" : "",
"type" : "",
"title" : [ {
"type" : "",
"text" : {
"content" : ""
},
"annotations" : {
"bold" : false,
"italic" : false,
"strikethrough" : false,
"underline" : false,
"code" : false,
"color" : ""
},
"plain_text" : ""
} ]
}
},
"url" : "",
"request_id" : ""
}Get Page or Block Children
Name: getPageOrBlockChildren
Retrieve the actual content of a page (represented by blocks)
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Page or Parent Block ID | STRING | true |
Example JSON Structure
{
"label" : "Get Page or Block Children",
"name" : "getPageOrBlockChildren",
"parameters" : {
"id" : ""
},
"type" : "notion/v1/getPageOrBlockChildren"
}Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
List Database Items
Name: listDatabaseItems
List all items in a Notion database.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Database ID | STRING | The ID of the database. | true |
| property | Sort By | STRING | Property to sort the items by. | true |
| direction | Sort Direction | STRING Optionsascending, descending | The direction to sort the items. | true |
Example JSON Structure
{
"label" : "List Database Items",
"name" : "listDatabaseItems",
"parameters" : {
"id" : "",
"property" : "",
"direction" : ""
},
"type" : "notion/v1/listDatabaseItems"
}Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Update Database Item
Name: updateDatabaseItem
Update specific fields in a Notion database item.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Database ID | STRING | The ID of the database. | true |
| databaseItemId | Database Item ID | STRING | The ID of the database item to update. | true |
| fields | DYNAMIC_PROPERTIES Depends Onid | true |
Example JSON Structure
{
"label" : "Update Database Item",
"name" : "updateDatabaseItem",
"parameters" : {
"id" : "",
"databaseItemId" : "",
"fields" : { }
},
"type" : "notion/v1/updateDatabaseItem"
}Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Triggers
New Database Item
Name: newDatabaseItem
Triggers when a new item is added to the database.
Type: POLLING
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Database ID | STRING | The ID of the database. | true |
Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
JSON Example
{
"label" : "New Database Item",
"name" : "newDatabaseItem",
"parameters" : {
"id" : ""
},
"type" : "notion/v1/newDatabaseItem"
}What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
How is this guide?
Last updated on
NocoDB
NocoDB is an open-source platform that transforms databases into smart spreadsheets, enabling users to manage and collaborate on data with a no-code interface.
Nutshell
Nutshell CRM is a user-friendly customer relationship management software designed to help small businesses manage sales, track leads, and streamline communication.