Lodol Docs

Notion

API actions for the Notion integration.

Notion

Connect to Notion to search content, query databases, and manage pages.


Append block children

Append child blocks to an existing Notion page or block.

Parameters

ParameterTypeRequiredDescription
block_idstringYesBlock or page ID. To append to a page, use the page ID from create_page or retrieve_page.
childrenarrayYesBlock objects to append. Each block must have a 'type' field and a corresponding object with that type name containing 'rich_text' array.

Response

{
  "appended": 3,
  "has_more": false,
  "next_cursor": null,
  "status": "success"
}

Create page in database

Create a new page within a Notion database with optional children blocks.

Parameters

ParameterTypeRequiredDescription
parent_database_idstringYesParent database ID. Use the list_databases action first to retrieve available database IDs.
titlestringYesPage title.
propertiesobjectNoAdditional page properties.
childrenarrayNoChild blocks to append. Each block must have a 'type' field and a corresponding object with that type name containing 'rich_text' array.
title_propertystringNoTitle property name.

Response

{
  "id": "n7m8l9k0j1i2",
  "status": "success",
  "title": "New Page",
  "url": "https://www.notion.so/New-Page-n7m8l9k0j1i2"
}

List databases

List accessible Notion databases with pagination and optional search query.

Parameters

ParameterTypeRequiredDescription
querystringNoSearch query.
page_sizenumberNoNumber of results to return.
start_cursorstringNoPagination cursor.

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"
}

Query database

Run a filtered query against a Notion database.

Parameters

ParameterTypeRequiredDescription
database_idstringYesDatabase ID.
filterobjectNoNotion filter object.
sortsarrayNoSort definitions.
page_sizenumberNoNumber of results to return.
start_cursorstringNoPagination cursor.

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

Retrieve a single Notion page and return simplified metadata.

Parameters

ParameterTypeRequiredDescription
page_idstringYesNotion 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 using a text query with pagination support.

Parameters

ParameterTypeRequiredDescription
querystringYesSearch query.
page_sizenumberNoNumber of results to return.
start_cursorstringNoPagination cursor.

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

ParameterTypeRequiredDescription
page_idstringYesNotion page ID.
propertiesobjectYesProperties to update, in Notion API 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"
}

On this page