Notion

From HybridAIOne/hybridclaw · View interactive version

Notion is an AI agent skill from the GitHub repository HybridAIOne/hybridclaw. Search, create, update, and organize Notion pages, databases, notes, and trackers through the Notion API.

How to use this skill

Skill file

Notion Workspace Operations

Use the Notion API for page, block, and data-source work.

Setup

If NOTION_API_KEY is not already configured:

  1. Create an internal integration in Notion.
  2. Save the token outside the repo, usually as NOTION_API_KEY.
  3. Share the target pages or databases with that integration.

Do not assume the integration can see a page until the user confirms sharing.

API Basics

Before API calls, write a private temp curl config and register cleanup so the

Notion token stays off the shell command line and the auth file is removed on

exit:

AUTH_CURL="$(mktemp)"
chmod 600 "$AUTH_CURL"
trap 'rm -f "$AUTH_CURL"' EXIT INT TERM
cat >"$AUTH_CURL" <<EOF
header = "Authorization: Bearer $NOTION_API_KEY"
header = "Notion-Version: 2025-09-03"
EOF

All requests need:

curl -s "https://api.notion.com/v1/..." -K "$AUTH_CURL"

Common Operations

Search:

curl -s -X POST "https://api.notion.com/v1/search" \
  -K "$AUTH_CURL" \
  -H "Content-Type: application/json" \
  -d '{"query":"release notes"}'

Get page metadata:

curl -s "https://api.notion.com/v1/pages/PAGE_ID" -K "$AUTH_CURL"

Get page blocks:

curl -s "https://api.notion.com/v1/blocks/PAGE_ID/children" -K "$AUTH_CURL"

Query a data source:

curl -s -X POST "https://api.notion.com/v1/data_sources/DATA_SOURCE_ID/query" \
  -K "$AUTH_CURL" \
  -H "Content-Type: application/json" \
  -d '{"page_size":20}'

Create a page in a database:

curl -s -X POST "https://api.notion.com/v1/pages" \
  -K "$AUTH_CURL" \
  -H "Content-Type: application/json" \
  -d '{"parent":{"database_id":"DATABASE_ID"},"properties":{"Name":{"title":[{"text":{"content":"New item"}}]}}}'

Append blocks:

curl -s -X PATCH "https://api.notion.com/v1/blocks/PAGE_ID/children" \
  -K "$AUTH_CURL" \
  -H "Content-Type: application/json" \
  -d '{"children":[{"object":"block","type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"Hello"}}]}}]}'

Important Notes

trap - EXIT INT TERM.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.