notion
БесплатноБез исполняемых скриптовНе проверенBuild integrations with the Notion API: databases and data sources, pages, blocks, search, and OAuth. Use when tasks involve reading or writing Notion…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Notion API Integration
Overview
The Notion REST API (https://api.notion.com/v1) reads and writes pages, blocks and databases that have been shared with a connection (what Notion's UI calls an integration). Since API version 2025-09-03 a database is a container of one or more data sources; rows are queried and their schema read through /v1/data_sources/{id}, not /v1/databases/{id}. Version 2026-03-11 (the latest at the time of writing) renamed archived to in_trash and replaced the after parameter of block append with position. This skill uses 2026-03-11 throughout.
Instructions
Authentication
Create a connection at https://www.notion.so/my-integrations, copy its token, and share each target page or database with it (page menu, Connections). Keep the token in an environment variable:
export NOTION_TOKEN="ntn_..." # from the connection's Configuration tab
For apps used by many workspaces, create a public connection and use OAuth 2.0: send the user to https://api.notion.com/v1/oauth/authorize?owner=user&client_id=...&redirect_uri=...&response_type=code, then POST the returned code (grant_type=authorization_code, same redirect_uri) to https://api.notion.com/v1/oauth/token with HTTP Basic auth client_id:client_secret. Each user authorizes separately. The Notion-Version header is required on every request.
Client setup and rate limits
"""notion_client.py — shared request helper with retry on 429/529/503."""
import os
import time
import requests
API = "https://api.notion.com/v1"
HEADERS = {
"Authorization": f"Bearer {os.environ['NOTION_TOKEN']}",
"Notion-Version": "2026-03-11",
"Content-Type": "application/json",
}
def call(method: str, path: str, **kwargs) -> dict:
"""Send a request; wait for Retry-After on HTTP 429 or 529, back off on 503 for GET."""
for attempt in range(5):
resp = requests.request(method, f"{API}{path}", headers=HEADERS, timeout=30, **kwargs)
if resp.status_code in (429, 529):
time.sleep(int(resp.headers.get("Retry-After", 2 ** attempt)))
continue
if resp.status_code == 503 and method == "GET":
time.sleep(2 ** attempt)
continue
resp.raise_for_status()
return resp.json()
raise RuntimeError(f"Notion request kept failing: {method} {path}")
Limits: each connection gets 180 requests per minute (about 3 per second; 600 per minute on Business and Enterprise workspaces), data source queries about 3 per second, and a separate workspace-wide budget exists. Do not retry a failed write blindly after a 503: check whether it was applied first. At most 100 blocks go in one append request, and a request body is limited in size.
Find the data source of a database
A database ID (from the URL) is not enough for queries. Fetch its data sources once and store the ID:
def get_data_source_id(database_id: str) -> str:
"""Return the first data source ID of a database (most databases have one)."""
db = call("GET", f"/databases/{database_id}")
return db["data_sources"][0]["id"]
Search also returns data source objects: {"filter": {"property": "object", "value": "data_source"}} ("database" was the value before 2025-09-03).
Query, create and update rows
def query_data_source(data_source_id: str, filter_obj: dict = None, sorts: list = None) -> list:
"""Return all pages of a data source matching the filter, following the cursor."""
body = {"page_size": 100}
if filter_obj:
body["filter"] = filter_obj
if sorts:
body["sorts"] = sorts
pages = []
while True:
data = call("POST", f"/data_sources/{data_source_id}/query", json=body)
pages.extend(data["results"])
if not data.get("has_more"):
return pages
body["start_cursor"] = data["next_cursor"]
def create_page(data_source_id: str, properties: dict, children: list = None) -> dict:
"""Create a row (page) in a data source."""
body = {"parent": {"data_source_id": data_source_id}, "properties": properties}
if children:
body["children"] = children
return call("POST", "/pages", json=body)
def update_page(page_id: str, properties: dict) -> dict:
"""Change properties of an existing page."""
return call("PATCH", f"/pages/{page_id}", json={"properties": properties})
def trash_page(page_id: str) -> dict:
"""Move a page to the trash (restorable from the Notion UI)."""
return call("PATCH", f"/pages/{page_id}", json={"in_trash": True})
Querying returns at most 10,000 results per query; narrow the filter for bigger sets. Example filter: {"property": "Status", "select": {"equals": "In Progress"}}; combine with {"and": [...]} or {"or": [...]}.
Property values
properties = {
"Name": {"title": [{"text": {"content": "Fix login redirect"}}]}, # every data source has one title property
"D
Установить notion в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл notion?
Build integrations with the Notion API: databases and data sources, pages, blocks, search, and OAuth. Use when tasks involve reading or writing Notion workspace data, syncing external tools with a Notion database, building dashboards from Notion content, or automating page creation and updates.
Как установить скилл notion?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл notion запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic