Notion
API actions for the Notion integration.
Notion
Connect to Notion to search content, look up items in databases, and create or update pages.
Add content to a page
Add content blocks to an existing Notion page or block.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | The ID of the page or block to add content to. To add to a page, use the page ID from 'Create page in database' or 'Retrieve page details'. |
children | array | Yes | Content blocks to add, in Notion's block format. Each block needs a 'type' field and a matching object of that type containing a 'rich_text' list. |
Response
{
"appended": 3,
"has_more": false,
"next_cursor": null,
"status": "success"
}Create page in database
Create a new page in a Notion database, with optional content blocks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
parent_database_id | string | Yes | The ID of the database to create the page in. Use the 'List databases' action first to find available database IDs. |
title | string | Yes | Page title. |
properties | object | No | Additional page properties. |
children | array | No | Content blocks to add to the page, in Notion's block format. Each block needs a 'type' field and a matching object of that type containing a 'rich_text' list. |
title_property | string | No | The name of the database's title property, if it is not 'Name'. |
Response
{
"id": "n7m8l9k0j1i2",
"status": "success",
"title": "New Page",
"url": "https://www.notion.so/New-Page-n7m8l9k0j1i2"
}List databases
List the Notion databases you can access, with an optional search to narrow the results.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | What to search for. |
page_size | number | No | Number of results to return. |
start_cursor | string | No | Leave blank for the first set of results. To get more, use the next cursor value from the previous run. |
Response
{
"count": 1,
"databases": [
{
"id": "x9y8z7w6v5u4",
"name": "Tasks Database",
"url": "https://www.notion.so/Tasks-Database-x9y8z7w6v5u4"
}
],
"has_more": false,
"next_cursor": null,
"status": "success"
}Find pages in a database
Find pages in a Notion database, with optional filters and sorting.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
database_id | string | Yes | Database ID. |
filter | object | No | Conditions the pages must match, in Notion's filter format. |
sorts | array | No | How to order the results, in Notion's sort format. |
page_size | number | No | Number of results to return. |
start_cursor | string | No | Leave blank for the first set of results. To get more, use the next cursor value from the previous run. |
Response
{
"count": 1,
"has_more": false,
"next_cursor": null,
"results": [
{
"id": "p1q2r3s4t5u6",
"last_edited_time": "2024-01-15T14:20:00.000Z",
"properties": {
"Name": "Task 1",
"Status": "In Progress"
},
"title": "Task 1",
"url": "https://www.notion.so/Task-1-p1q2r3s4t5u6"
}
],
"status": "success"
}Retrieve page details
Look up a Notion page and get its title, link, and key details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Notion page ID. |
Response
{
"archived": false,
"id": "a1b2c3d4e5f6",
"last_edited_time": "2024-01-15T10:30:00.000Z",
"properties": {
"Name": "Meeting Notes",
"Status": "Complete"
},
"status": "success",
"title": "Meeting Notes",
"url": "https://www.notion.so/Meeting-Notes-a1b2c3d4e5f6"
}Search pages
Search for Notion pages that match the text you enter.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | What to search for. |
page_size | number | No | Number of results to return. |
start_cursor | string | No | Leave blank for the first set of results. To get more, use the next cursor value from the previous run. |
Response
{
"count": 1,
"has_more": false,
"next_cursor": null,
"pages": [
{
"id": "a1b2c3d4e5f6",
"last_edited_time": "2024-01-15T10:30:00.000Z",
"title": "Project Planning",
"url": "https://www.notion.so/Project-Planning-a1b2c3d4e5f6"
}
],
"status": "success"
}Update page properties
Update properties on an existing Notion page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Notion page ID. |
properties | object | Yes | The properties to change and their new values, in Notion's property format. |
Response
{
"id": "a1b2c3d4e5f6",
"last_edited_time": "2024-01-15T10:30:00.000Z",
"status": "success",
"title": "Updated Page",
"url": "https://www.notion.so/Updated-Page-a1b2c3d4e5f6"
}