notion
What it does
This skill connects your AI to Notion, the note and project tool. It is for people who keep pages and databases in Notion and want their AI to read or update them.
When to use it
- βWhen you want your AI to create, read or update Notion pages or databases.
- βWhen you want to upload files to a Notion page.
- βWhen you need to connect a Notion integration so your AI can access a page.
Skill link
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/productivity/notion/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βAdd a new task to my Notion project database with the due date next Friday.β
5 new skills a week. 1 minute to read.
How it works
The skill uses a Notion integration token. It can call the ntn command line tool where it is installed, or make plain web requests with curl on any system, including Windows.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Notion
Talk to Notion two ways. Same integration token works for both β pick by what's available.
β ntn CLI β Notion's official CLI. Shorter syntax, one-line file uploads, required for Workers. macOS + Linux only as of May 2026 (Windows support "coming soon"). Default when installed.
β HTTP + curl β works everywhere including Windows. Default fallback when ntn isn't installed.
Setup
1. Get an integration token (required for both paths)
- Create an integration at https://notion.so/my-integrations
- Copy the API key (starts with
ntn_orsecret_) - Store in
${HERMES_HOME:-~/.hermes}/.env:NOTION_API_KEY=ntn_your_key_here - Share target pages/databases with the integration in Notion: page menu
...βConnect toβ your integration name. Without this, the API returns 404 for that page even though it exists.
2. Install ntn (preferred path on macOS / Linux)
# Recommended
curl -fsSL https://ntn.dev | bash
# Or via npm (needs Node 22+, npm 10+)
npm install --global ntn
ntn --version # verify
Skip ntn login β use the integration token instead. This works headlessly, no browser needed:
export NOTION_API_TOKEN=$NOTION_API_KEY # ntn reads NOTION_API_TOKEN
export NOTION_KEYRING=0 # don't try to use the OS keychain
Add those exports to your shell profile (or to ${HERMES_HOME:-~/.hermes}/.env) so every session inherits them.
3. Choose path at runtime
if command -v ntn >/dev/null 2>&1; then
# use ntn
else
# fall back to curl
fi
Windows users: skip step 2 entirely until native ntn ships β Path B works fine. If you want CLI ergonomics now, install ntn inside WSL2.
API Basics
Notion-Version: 2025-09-03 is required on all HTTP requests. ntn handles this for you. In this version, what users call "databases" are called data sources in the API.
Path A β ntn CLI (preferred, macOS / Linux)
Raw API calls (shorthand for curl)
ntn api v1/users # GET
# POST with inline body
ntn api v1/pages parent[page_id]=abc123 \
properties[title][0][text][content]="Notes"
ntn api v1/pages/abc123 -X PATCH archived:=true # PATCH; := is non-string (bool/num/null)
Syntax notes:
key=valueβ string fieldskey[nested]=valueβ nested object fieldskey:=valueβ typed assignment (booleans, numbers, null, arrays)
Search
ntn api v1/search query="page title"
Read page metadata
ntn api v1/pages/{page_id}
Read page as Markdown (agent-friendly)
ntn api v1/pages/{page_id}/markdown
Read page content as blocks
ntn api v1/blocks/{page_id}/children
Create page from Markdown
ntn api v1/pages \
parent[page_id]=xxx \
properties[title][0][text][content]="Notes from meeting" \
markdown="# Agenda
- Q3 roadmap
- Hiring"
Patch a page with Markdown
ntn api v1/pages/{page_id}/markdown -X PATCH \
markdown="## Update
Shipped the prototype."
Query a database (data source)
ntn api v1/data_sources/{data_source_id}/query -X POST \
filter[property]=Status filter[select][equals]=Active
For complex queries with sorts, multiple filter clauses, or compound logic, pipe JSON in:
echo '{"filter": {"property": "Status", "select": {"equals": "Active"}}, "sorts": [{"property": "Date", "direction": "descending"}]}' | \
ntn api v1/data_sources/{data_source_id}/query -X POST --json -
File uploads (one-liner β biggest CLI win)
ntn files create < photo.png
ntn files create --external-url https://example.com/photo.png
ntn files list
Compare to the 3-step HTTP flow (create upload β PUT bytes β reference).
Useful env vars
| Var | Effect |
|---|---|
NOTION_API_TOKEN |
Auth token (overrides keychain) β set this to your integration token |
NOTION_KEYRING=0 |
File-based creds at ~/.config/notion/auth.json instead of OS keychain |
NOTION_WORKSPACE_ID |
Skip the workspace picker prompt |
Path B β HTTP + curl (cross-platform, default on Windows)
All requests share this pattern:
curl -s -X GET "https://api.notion.com/v1/..." \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json"
On Windows the curl shipped with Windows 10+ works as-is. PowerShell users can also use Invoke-RestMethod.
Search
FAQ
Why does the AI return a 404 error for a page I can see?
The skill says you must share the page with your integration in Notion, using the Connect to menu, or the API will return 404.
Does the ntn tool work on Windows?
The skill says ntn is for macOS and Linux as of May 2026, so Windows users should use the curl method.
Where do I store the token?
The skill suggests saving it in your Hermes .env file as NOTION_API_KEY.
Details
Original description by the author
Notion API + ntn CLI: pages, databases, markdown, Workers.
Popularity
- GitHub stars
- 260k
- Ranking position
- #541
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-merge-conflict-arbiter
260kSettles a git merge conflict between two agents' branches as a neutral third party, producing one merged result for the repo.
antigravity-cli
260kGuides you through installing, updating, and troubleshooting the Antigravity command line tool, including its plugins, sign-in, and sandbox.
blackbox
260kLets your agent hand a coding task to the Blackbox AI command line tool, which runs several AI models and picks the best result.
dynamic-workflow
260kTeaches your agent to run large batches of similar work as a saved script, so only verified results return to the main conversation.
Similar skills
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.