بنقرة واحدة
notion
Use Notion through the official ntn CLI: search, read/write pages, data sources, Markdown, files, and Workers.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use Notion through the official ntn CLI: search, read/write pages, data sources, Markdown, files, and Workers.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Build today's mapped ZEP time-log plan from Google Calendar, preview it against ZEP, and enter it through guarded Playwright automation only after explicit approval.
Help users create structured decision matrices by suggesting criteria, options, and weights — output as comparison tables
Backup CLAUDE.md, TASKS.md, and memory/ to a private Git repo using `bash .claude/skills/memory-backup/backup.sh`.
Pull recent Notion Journal entries into memory/journals/YYYY/month_YYYY-MM_text.txt.
Fetches live prices for equities and forex for investment portfolio.
Sync work context from external sources, update tasks and memory, and report changes
| name | notion |
| description | Use Notion through the official ntn CLI: search, read/write pages, data sources, Markdown, files, and Workers. |
| tools | ["Bash"] |
Use the official ntn CLI for all Notion operations.
Do not use a curl/HTTP fallback for normal work. If ntn is unavailable, ask the user to install it or confirm an alternate approach.
Required environment variable, usually stored in the project .env:
NOTION_API_TOKEN=ntn_your_token_here
This project includes an npm helper that loads .env:
npm run --silent ntn -- api v1/users
Prefer this helper for agent workflows.
If .env is missing or does not contain NOTION_API_TOKEN, ask the user to add it before continuing.
Optional .env entry:
NOTION_WORKSPACE_ID=<workspace_id>
macOS/Linux:
curl -fsSL https://ntn.dev | bash
Or with npm:
npm install --global ntn
Requires Node 22+ and npm 10+.
Verify:
ntn --version
Skip ntn login for agent workflows. Use the integration token via NOTION_API_TOKEN.
Before reading or writing Notion content, the target page or database must be shared with the integration:
...Connect toIf this is missing, Notion may return 404 even when the page exists.
ntn is installed with command -v ntn.ntn is missing, refer the user to the Installation section and stop unless they ask you to install it.npm run --silent ntn -- ... so .env is loaded automatically. Use --silent when piping JSON to jq./markdown endpoints when reading or editing page content for summarization or agent-friendly processing./data_sources query endpoints.database_id when creating a page inside a database.data_source_id when querying a database/data source.jq for inspection.ntn api SyntaxOfficial guide: https://developers.notion.com/cli/guides/api-requests
ntn api adds Authorization and Notion-Version headers automatically. It sends GET by default unless request body input is present; body input makes POST the default unless -X overrides it.
Basic GET:
ntn api v1/users
Inline body fields:
ntn api v1/pages \
parent[page_id]=abc123 \
properties[title][0][text][content]="Notes"
PATCH:
ntn api v1/pages/abc123 -X PATCH archived:=true
Syntax reference:
| Syntax | Meaning |
|---|---|
path=value | Body field with a string value |
path:=json | Body field parsed as JSON: boolean, number, string, array, object, or null |
name==value | Query parameter |
Header:Value | Request header |
Nested body paths support bracket and dot notation. Prefer bracket notation for property names with spaces or punctuation.
JSON request bodies:
cat body.json | ntn api v1/pages--data '{"query":"roadmap","page_size":10}'--json -; current ntn expects stdin JSON directly.--data, or inline body fields. Query parameters and headers can still be combined with any one body source.Inspect/debug helpers:
ntn api ls
ntn api v1/comments --help
ntn api v1/comments --spec -X POST
ntn api v1/comments --docs -X POST
ntn --verbose api v1/pages/$PAGE_ID
ntn api v1/search query="page title"
Inspect first result:
ntn api v1/search query="roadmap" | jq '.results[0]'
ntn api v1/pages/{page_id}
Use this by default for content reading:
ntn api v1/pages/{page_id}/markdown
ntn api v1/blocks/{page_id}/children
ntn api v1/pages \
parent[page_id]=xxx \
properties[title][0][text][content]="Notes from meeting" \
markdown="# Agenda
- Q3 roadmap
- Hiring"
ntn api v1/pages/{page_id}/markdown -X PATCH \
markdown="## Update
Shipped the prototype."
ntn api v1/pages/{page_id} -X PATCH \
properties[Status][select][name]="Done"
ntn api v1/pages/{page_id} -X PATCH archived:=true
In Notion API version 2025-09-03, databases are represented as data sources for query/retrieval.
ntn api v1/data_sources/{data_source_id}/query -X POST \
filter[property]=Status \
filter[select][equals]=Active
Use JSON for compound filters, sorts, or complex request bodies:
cat <<'JSON' | ntn api v1/data_sources/{data_source_id}/query -X POST
{
"filter": {
"property": "Status",
"select": {
"equals": "Active"
}
},
"sorts": [
{
"property": "Date",
"direction": "descending"
}
]
}
JSON
ntn api v1/pages \
parent[database_id]=xxx \
properties[Name][title][0][text][content]="New Item" \
properties[Status][select][name]="Todo"
Prefer JSON for schemas:
cat <<'JSON' | ntn api v1/data_sources -X POST
{
"parent": {
"page_id": "xxx"
},
"title": [
{
"text": {
"content": "My Database"
}
}
],
"properties": {
"Name": {
"title": {}
},
"Status": {
"select": {
"options": [
{ "name": "Todo" },
{ "name": "Done" }
]
}
},
"Date": {
"date": {}
}
}
}
JSON
For inline data sources, include:
is_inline:=true
| Type | ntn example |
|---|---|
| Title | properties[Name][title][0][text][content]="Title" |
| Rich text | properties[Notes][rich_text][0][text][content]="Text" |
| Select | properties[Status][select][name]="Todo" |
| Multi-select | properties[Tags][multi_select][0][name]="A" |
| Date | properties[Date][date][start]="2026-01-15" |
| Checkbox | properties[Done][checkbox]:=true |
| Number | properties[Score][number]:=42 |
| URL | properties[Website][url]="https://example.com" |
properties[Email][email]="user@example.com" | |
| Relation | properties[Related][relation][0][id]="page_id" |
Append blocks to a page:
cat <<'JSON' | ntn api v1/blocks/{page_id}/children -X PATCH
{
"children": [
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"text": {
"content": "Hello from ntn!"
}
}
]
}
}
]
}
JSON
Upload a local file:
ntn files create < photo.png
Upload an external URL:
ntn files create --external-url https://example.com/photo.png
List files:
ntn files list
The /markdown endpoints support CommonMark plus Notion-specific XML-like tags.
Use tabs for indentation inside Notion-specific block tags.
<callout icon="🎯" color="blue_bg">
Ship the MVP by **Friday**.
</callout>
<details color="gray">
<summary>Toggle title</summary>
Children indented one tab
</details>
<columns>
<column>Left side</column>
<column>Right side</column>
</columns>
<table_of_contents color="gray"/>
<mention-page url="...">Page Title</mention-page>
<mention-date start="2026-05-15"/>
<span underline="true">underlined text</span>
<span color="blue">blue text</span>
Inline math: $x^2$
Block math:
$$
E = mc^2
$$
Colors:
gray brown orange yellow green blue purple pink red
gray_bg brown_bg orange_bg yellow_bg green_bg blue_bg purple_bg pink_bg red_bg
Notion Workers are TypeScript programs hosted by Notion. They can expose:
Deployment requires a Business or Enterprise Notion plan.
ntn workers new my-worker
cd my-worker
Edit src/index.ts:
import { Worker } from "@notionhq/workers";
const worker = new Worker();
export default worker;
worker.tool("greet", {
title: "Greet a User",
description: "Returns a friendly greeting",
inputSchema: {
type: "object",
properties: {
name: {
type: "string"
}
},
required: ["name"]
},
execute: async ({ name }) => `Hello, ${name}!`,
});
Deploy:
ntn workers deploy --name my-worker
worker.webhook("onGithubPush", {
title: "GitHub Push Handler",
execute: async (events, { notion }) => {
for (const event of events) {
console.log("got delivery", event.deliveryId);
// event.body, event.rawBody, event.headers
}
},
});
List webhook URLs:
ntn workers webhooks list
Treat webhook URLs as secrets. Anyone with the URL can send events unless signature verification is implemented.
ntn workers deploy
ntn workers list
ntn workers exec <capability-key> -d '{"name": "world"}'
ntn workers sync trigger <key>
ntn workers sync pause <key>
ntn workers env set GITHUB_WEBHOOK_SECRET=...
ntn workers runs list
ntn workers runs logs <run-id>
ntn workers webhooks list
404, verify the target page/database is shared with the integration..env contains NOTION_API_TOKEN.ntn prompts for keychain access, set NOTION_KEYRING=0.NOTION_WORKSPACE_ID.