with one click
notion
Manage Notion pages, databases, blocks and users via REST API
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Manage Notion pages, databases, blocks and users via REST API
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Manage Cloudflare zones, DNS records, Workers, Pages and cache via API
Manage Cloudinary media assets, transformations and upload via REST API
Monitor infrastructure, query metrics, manage monitors and events via Datadog API
Manage DigitalOcean droplets, domains, databases, apps and volumes via API v2
Manage Firebase projects, Firestore, Auth users and Hosting via REST API
Manage Intercom conversations, contacts, articles and help center via REST API
Based on SOC occupation classification
| name | notion |
| description | Manage Notion pages, databases, blocks and users via REST API |
| user-invocable | true |
| argument-hint | ["action or page title"] |
Connect to Notion to search, manage pages, query databases, edit blocks and list users. Pure Ruby, zero gems — stdlib only.
scripts/
├── auth.rb # Bearer token auth + notion_request helper (required by all scripts)
├── check_setup.rb # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb # Save and validate an integration token
├── search.rb # Search pages and databases
├── databases.rb # List databases
├── database.rb # Get database details and properties
├── query_database.rb # Query a database
├── pages.rb # List pages
├── page.rb # Get page details
├── create_page.rb # Create a page
├── update_page.rb # Update page properties
├── blocks.rb # List child blocks
├── append_blocks.rb # Append blocks to a page
├── delete_block.rb # Delete a block
└── users.rb # List users
ruby ~/.claude/skills/notion/scripts/check_setup.rb
If the output is OK, proceed to the Flow section.
If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.
Step 1 — Ask the user to create an integration:
You need a Notion integration token.
- Go to https://www.notion.so/my-integrations
- Click New integration
- Give it a name, select the workspace
- Copy the Internal Integration Secret (starts with
secret_)- Share the pages/databases you want to access with the integration (open the page, click
...> Connections > add your integration)Paste the integration token here.
Step 2 — When the user pastes the token, save it:
ruby ~/.claude/skills/notion/scripts/save_token.rb 'PASTED_TOKEN'
If the script outputs an error, the token is invalid. Ask the user to double-check and try again.
If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.
The argument $ARGUMENTS may contain an action or page title.
ruby ~/.claude/skills/notion/scripts/search.rb "QUERY"
ruby ~/.claude/skills/notion/scripts/pages.rb
ruby ~/.claude/skills/notion/scripts/databases.rb
Present the results and ask what the user wants to do.
Search pages and databases:
ruby ~/.claude/skills/notion/scripts/search.rb "QUERY" --filter page
ruby ~/.claude/skills/notion/scripts/search.rb "QUERY" --filter database --page-size 10
List databases:
ruby ~/.claude/skills/notion/scripts/databases.rb
Get database details:
ruby ~/.claude/skills/notion/scripts/database.rb DATABASE_ID
Query a database:
ruby ~/.claude/skills/notion/scripts/query_database.rb DATABASE_ID --page-size 20
List pages:
ruby ~/.claude/skills/notion/scripts/pages.rb
ruby ~/.claude/skills/notion/scripts/pages.rb "QUERY" --page-size 10
Get page details:
ruby ~/.claude/skills/notion/scripts/page.rb PAGE_ID
Create a page under a page (requires user confirmation):
ruby ~/.claude/skills/notion/scripts/create_page.rb PARENT_PAGE_ID "My New Page"
Create a page in a database (requires user confirmation):
ruby ~/.claude/skills/notion/scripts/create_page.rb DATABASE_ID "New Entry" --database
Update page properties (requires user confirmation):
ruby ~/.claude/skills/notion/scripts/update_page.rb PAGE_ID "Name" "New Title"
ruby ~/.claude/skills/notion/scripts/update_page.rb PAGE_ID "Description" "Updated text"
List child blocks:
ruby ~/.claude/skills/notion/scripts/blocks.rb PAGE_ID
ruby ~/.claude/skills/notion/scripts/blocks.rb PAGE_ID --page-size 50
Append blocks to a page (requires user confirmation):
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "Hello world"
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "My Heading" --type heading_1
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "Buy groceries" --type to_do
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "console.log('hi')" --type code
Block types: paragraph (default), heading_1, heading_2, heading_3, bulleted_list_item, numbered_list_item, to_do, code
Delete a block (requires user confirmation):
ruby ~/.claude/skills/notion/scripts/delete_block.rb BLOCK_ID
List users:
ruby ~/.claude/skills/notion/scripts/users.rb
secret_)Notion-Version: 2022-06-28 header~/.config/notion/token (outside the repo, never commit)https://api.notion.com/v1