From openhands-skills
Create, search, and update Notion pages/databases using the Notion API. Useful for documenting work, generating runbooks, and automating knowledge base updates.
npx claudepluginhub openhands/extensionsThis skill uses the workspace's default tool permissions.
<IMPORTANT>
Provides Node CLI for Notion API: search content, query databases by ID with filters, create pages in databases. Outputs JSON; auth via NOTION_KEY.
Creates minimal Notion API examples for searching pages, adding test pages to databases, and retrieving them. Use when testing setup or learning search/pages/users basics.
Uses Notion API to search, retrieve, create, query, and manage pages, databases (data sources), and blocks via curl commands. Requires NOTION_API_KEY.
Share bugs, ideas, or general feedback.
[ -n "$NOTION_INTEGRATION_KEY" ] && echo "NOTION_INTEGRATION_KEY is set" || echo "NOTION_INTEGRATION_KEY is NOT set"
If it’s missing, ask the user to provide it (or connect a Notion integration) before proceeding:
ntn_...)Also confirm the integration has been shared with the target page/database in Notion.
-H "Authorization: Bearer ${NOTION_INTEGRATION_KEY}" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json"
Use Notion’s search endpoint to find a page by title.
curl -s https://api.notion.com/v1/search \
-H "Authorization: Bearer ${NOTION_INTEGRATION_KEY}" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"query": "OpenHands Wiki",
"page_size": 10
}' | jq .
PARENT_PAGE_ID="<parent_page_id>"
curl -s https://api.notion.com/v1/pages \
-H "Authorization: Bearer ${NOTION_INTEGRATION_KEY}" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"parent": {"type": "page_id", "page_id": "'"${PARENT_PAGE_ID}"'"},
"properties": {
"title": {
"title": [{"type": "text", "text": {"content": "My new page"}}]
}
},
"children": [
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": "Hello from OpenHands."}}]
}
}
]
}' | jq .
Use the page’s block id (same as page id) to append children.
PAGE_ID="<page_id>"
curl -s -X PATCH "https://api.notion.com/v1/blocks/${PAGE_ID}/children" \
-H "Authorization: Bearer ${NOTION_INTEGRATION_KEY}" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"children": [
{
"object": "block",
"type": "heading_2",
"heading_2": {"rich_text": [{"type": "text", "text": {"content": "Appended section"}}]}
}
]
}' | jq .