Notion Hub logo

Notion Hub

Organization
OpenMinis
notion-hub

Read and write Notion data using Python + notion-client SDK. Authenticated via NOTION_API_KEY env var. Supports search, page CRUD (Markdown↔Blocks bidirectional conversion), database schema/query/create/add-row, block-level operations (append/update/delete), and comments. Trigger this skill whenever the user mentions "Notion", "notion", "notion-hub", "Notion page", "Notion database", "read Notion", "write Notion", "Notion API", or any scenario requiring programmatic read/write access to Notion data.

Overview

PublisherOpenMinis
RepositoryMinisSkills
Skill namenotion-hub
Stars
543
Forks
86
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by OpenMinis on GitHub. Read the source before you install it.

Installation

Install the Notion Hub AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/OpenMinis/MinisSkills/tree/main/notion-hub
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OpenMinis/MinisSkills.git /tmp/MinisSkills
mkdir -p .claude/skills
cp -r /tmp/MinisSkills/notion-hub .claude/skills/notion-hub
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Notion Hub in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Notion Hub on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Notion Hub is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Notion Hub

Read/write Notion via notion-client Python SDK. All operations through a single CLI script.

Prerequisites

  • Environment variable: NOTION_API_KEY — Notion Internal Integration Token
  • uv: The script uses uv inline script metadata (notion-client>=3.0.0, httpx>=0.27). Dependencies are auto-installed on first uv run, no manual pip install needed.
  • Integration access: The integration must be connected to target pages/databases in Notion UI (Share → Connections → add integration)

CLI Script

Path: /var/minis/skills/notion-hub/scripts/notion_hub.py

Run: uv run --script --cache-dir /root/.cache/uv /var/minis/skills/notion-hub/scripts/notion_hub.py <command> [options]

Alias for brevity:

sh
NH="uv run --script --cache-dir /root/.cache/uv /var/minis/skills/notion-hub/scripts/notion_hub.py"

Commands Reference

Search & Discovery

sh
# Search everything
$NH search "meeting notes"
$NH search "project" --filter page
$NH search --filter database
$NH search "Q1" --sort descending --limit 5

# List users / get bot info
$NH users
$NH users --me

Pages — Read

sh
# Get page properties (compact)
$NH page-get <page_id_or_url>
$NH page-get <page_id> --raw  # full API response

# Read page content as Markdown (best for AI consumption)
$NH page-read <page_id>
$NH page-read <page_id> --depth 5  # deeper recursion
$NH page-read <page_id> -o /var/minis/workspace/page.md  # save to file

# Accepts Notion URLs directly:
$NH page-read "https://notion.so/My-Page-abc123def456..."

Pages — Write

sh
# Create page under another page
$NH page-create --page-id <parent_id> --title "New Page" --icon "📝"

# Create page in a database (= add row with content)
$NH page-create --database-id <db_id> --properties '{"Name":{"title":[{"text":{"content":"Task 1"}}]}}'

# Write Markdown content to a page
$NH page-write <page_id> --text "# Hello\n\nThis is a paragraph.\n\n- Item 1\n- Item 2"

# Write from file
$NH page-write <page_id> --file /var/minis/workspace/content.md

# Replace all existing content
$NH page-write <page_id> --text "Fresh content" --replace

# Update page properties
$NH page-update <page_id> --properties '{"Status":{"status":{"name":"Done"}}}'
$NH page-update <page_id> --icon "✅"
$NH page-update <page_id> --archived true  # archive page

Databases

sh
# Get database schema (shows all properties, types, select options)
$NH db-get <database_id>
$NH db-get <database_id> --raw

# Query database rows
$NH db-query <database_id>
$NH db-query <database_id> --limit 20

# Query with filter
$NH db-query <database_id> --filter '{"property":"Status","status":{"equals":"In Progress"}}'

# Query with sort
$NH db-query <database_id> --sorts '[{"property":"Created","direction":"descending"}]'

# Compound filter
$NH db-query <db_id> --filter '{"and":[{"property":"Status","status":{"equals":"Done"}},{"property":"Priority","select":{"equals":"High"}}]}'

# Quick add a row (auto-detects property types from schema)
$NH db-add-row -d <database_id> --props '{"Name":"My Task","Status":"In Progress","Priority":"High","Due Date":"2024-03-15"}'
$NH db-add-row -d <database_id> --title "Simple row with just a title"

# Create a new database
$NH db-create --page-id <parent_page_id> --title "Task Tracker" --properties '{
  "Name": {"title": {}},
  "Status": {"status": {}},
  "Priority": {"select": {"options": [{"name":"High"},{"name":"Medium"},{"name":"Low"}]}},
  "Due Date": {"date": {}},
  "Tags": {"multi_select": {"options": [{"name":"Bug"},{"name":"Feature"}]}},
  "Assignee": {"people": {}},
  "Done": {"checkbox": {}}
}'

# Update database schema
$NH db-update <db_id> --title "New Title"
$NH db-update <db_id> --properties '{"New Column": {"rich_text": {}}}'

Blocks (Page Content)

sh
# Get top-level blocks of a page
$NH blocks-get <page_id>
$NH blocks-get <page_id> --raw

# Get ALL blocks recursively (full page tree)
$NH blocks-get-all <page_id>
$NH blocks-get-all <page_id> --depth 5

# Append content
$NH block-append <page_id> --text "A new paragraph"
$NH block-append <page_id> --text "Item A\\nItem B\\nItem C" --type bulleted_list_item
$NH block-append <page_id> --blocks '[{"type":"heading_2","heading_2":{"rich_text":[{"text":{"content":"Section"}}]}},{"type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"Content here"}}]}}]'

# Update a specific block
$NH block-update <block_id> --content '{"paragraph":{"rich_text":[{"text":{"content":"Updated text"}}]}}'

# Delete a block
$NH block-delete <block_id>

Comments

sh
# List comments on a page
$NH comments-list <page_id>

# Add a comment to a page
$NH comment-create "This looks good!" --page-id <page_id>

# Reply in a discussion thread
$NH comment-create "Agreed" --discussion-id <discussion_id>

Notion Filter Syntax Quick Reference

json
// Text property
{"property": "Name", "rich_text": {"contains": "keyword"}}

// Select
{"property": "Status", "select": {"equals": "Done"}}

// Multi-select
{"property": "Tags", "multi_select": {"contains": "Bug"}}

// Status
{"property": "Status", "status": {"equals": "In Progress"}}

// Checkbox
{"property": "Done", "checkbox": {"equals": true}}

// Date
{"property": "Due", "date": {"before": "2024-04-01"}}
{"property": "Due", "date": {"on_or_after": "2024-01-01"}}

// Number
{"property": "Score", "number": {"greater_than": 80}}

// Compound (AND)
{"and": [{"property": "Status", "status": {"equals": "Done"}}, {"property": "Priority", "select": {"equals": "High"}}]}

// Compound (OR)
{"or": [{"property": "Status", "status": {"equals": "Done"}}, {"property": "Status", "status": {"equals": "Archived"}}]}

Notion Sort Syntax

json
[{"property": "Created", "direction": "descending"}]
[{"property": "Name", "direction": "ascending"}]
[{"timestamp": "last_edited_time", "direction": "descending"}]

Property Value Syntax for db-add-row --props

The --props JSON maps property names to simple values. The script auto-detects types from the database schema:

TypeValue formatExample
titlestring"My Title"
rich_textstring"Some text"
numbernumber42
selectstring (option name)"High"
multi_selectcomma-separated string or array"Bug,Feature" or ["Bug","Feature"]
statusstring (status name)"In Progress"
dateISO date string or {start, end}"2024-03-15"
checkboxbooleantrue
urlstring"https://..."
emailstring"a@b.com"
relationcomma-separated IDs or array"id1,id2"
peoplecomma-separated user IDs"user_id"
filesURL string or array of URLs"https://file.png"

Workflow Tips

  1. First time: Run $NH search or $NH search --filter database to discover accessible pages/databases and get their IDs.
  2. Before writing to a database: Run $NH db-get <id> to see the schema (property names, types, select options).
  3. Reading a page: Use page-read for Markdown output — much more readable than raw blocks.
  4. Writing a page: Use page-write --text with Markdown — the script auto-converts to Notion blocks.
  5. IDs: Both raw UUIDs and full Notion URLs are accepted for all ID parameters.
  6. Pagination: All list/query commands auto-paginate. Use --limit to cap results.

Error Handling

All errors return {"error": "..."} JSON. Common issues:

  • 401: Invalid or expired token
  • 403: Integration not connected to the target page/database
  • 404: Page/database not found or not accessible
  • 429: Rate limited (auto-retry is not implemented; wait and retry)

Security Notes

  • NOTION_API_KEY: Never echo, print, or expose the token value in conversation. Always reference via $NOTION_API_KEY.
  • User emails: The users command auto-masks email addresses (e.g. w***3@gmail.com). Do not attempt to retrieve or display full emails.
  • File URLs: Notion internal file URLs contain signed AWS tokens. The script auto-strips these from Markdown/block output. If you need to download a file, use blocks-get --raw and handle the URL in a script without printing it.
  • Recursion depth: blocks-get-all and page-read cap at depth 10 to prevent API call storms.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Notion Hub AI skill do?

Read and write Notion data using Python + notion-client SDK. Authenticated via NOTION_API_KEY env var. Supports search, page CRUD (Markdown↔Blocks bidirectional conversion), database schema/query/create/add-row, block-level operations (append/update/delete), and comments. Trigger this skill whenever the user mentions "Notion", "notion", "notion-hub", "Notion page", "Notion database", "read Notion", "write Notion", "Notion API", or any scenario requiring programmatic read/write access to Notion data.

Why use Notion Hub on TypingMind?

Because you install it once and use it with any model. Notion Hub is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Notion Hub in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/OpenMinis/MinisSkills/tree/main/notion-hub. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Notion Hub?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Notion Hub?

As many as you like. As long as a model supports skills, you can use Notion Hub with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Notion Hub AI skill free?

Yes. It is published on GitHub by OpenMinis under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇