ACTIONS
  • Home
  • My Actions
  • My Projects
  • My Packages
Notion -> Database: Update Properties
Readonly
How to Get a Notion API Key

Action summary

Notion -> Database: Update Properties

Xano / Notion

How to Get a Notion API Key

  1. Create an Integration

    • Go to the Notion Developers Portal.
    • Click "New Integration", name it, select a workspace, and submit.
  2. Get Your API Key

    • Copy the Internal Integration Token from the integration settings page.
  3. Grant Database Access

    • Open your Notion database.
    • Click the three button dropdown at the top right of your screen, click Connections, and then select your integration.
  4. Use the API Key

    • Add it to your Xano Actions in the Settings Registry input option:

For more details, see the Notion API Docs.

Notion → Database: Update Properties

Overview

This Xano action updates properties of a Notion database using its unique identifier (database_id). It uses the Notion API's PATCH method to modify database properties.


Inputs

Name Type Description
notion_api_key registry text
database_id text The unique identifier of the database
properties json The properties to update in the database

Function Stack

  1. Notion API Request

    • API Endpoint: https://api.notion.com/v1/databases/%s
    • HTTP Method: PATCH
    • Headers:
      • Authorization: Bearer <notion_api_key>
      • Notion-Version: 2022-06-28
    • Replace %s in the endpoint with the provided database_id
  2. Precondition

    • Ensures that the HTTP request was successful
    • Condition: notion_api_response.status == 200
    • If this condition fails, execution halts and an error is thrown

Response

Key Value
As Self Returns notion_api_response.result

Example

Input

{
  "parent": "98ad959b-2b6a-4774-80ee-00246fb0ea9b",
  "properties": {
	"J@cT": {
		"name": "New Property Name"
  }
}

Output

{
    "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"
        }
    },
    .
    .
    .
    {
      .
      .
      .
        "Name": {
            "id": "title",
            "name": "Name",
            "type": "title",
            "title": {}
        }
    },
    "parent": {
        "type": "page_id",
        "page_id": "98ad959b-2b6a-4774-80ee-00246fb0ea9b"
    },
    "archived": false,
    "is_inline": false
}

Version notes

Initial version
Current
2025-04-15T22:44:39.000+00:00