โ† Back to Skill Explorer

๐Ÿ““ notion-sync

Read, create, and update Notion pages and databases. Search content. Sync notes between Notion and workspace.

๐Ÿฆž Pixeyo CuratedRequires: curlEnv: NOTION_API_KEYโœ“ Read source below

Integrate with Notion to read pages, query databases, create new pages, and update existing content. Uses the official Notion API.

Setup

The user needs a Notion integration token:

1. Go to https://www.notion.so/my-integrations

2. Create a new integration (give it read + write access)

3. Copy the token and set: export NOTION_API_KEY=ntn_xxxxx

4. Share specific pages/databases with the integration in Notion

API Base

All requests go to https://api.notion.com/v1/ with headers:

Authorization: Bearer ${NOTION_API_KEY}
Notion-Version: 2022-06-28
Content-Type: application/json

Operations

Search for pages

curl -s -X POST 'https://api.notion.com/v1/search' \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"query":"SEARCH_TERM","page_size":5}'

Read a page

curl -s 'https://api.notion.com/v1/pages/PAGE_ID' \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28"

curl -s 'https://api.notion.com/v1/blocks/PAGE_ID/children?page_size=100' \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28"

Query a database

curl -s -X POST 'https://api.notion.com/v1/databases/DATABASE_ID/query' \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"page_size":10}'

Create a page

curl -s -X POST 'https://api.notion.com/v1/pages' \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{
    "parent": {"database_id":"DATABASE_ID"},
    "properties": {
      "Name": {"title": [{"text": {"content": "PAGE TITLE"}}]}
    },
    "children": [
      {"object":"block","type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"Page content here."}}]}}
    ]
  }'

Append content to a page

curl -s -X PATCH 'https://api.notion.com/v1/blocks/PAGE_ID/children' \
  -H "Authorization: Bearer ${NOTION_API_KEY}" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{
    "children": [
      {"object":"block","type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"New content appended."}}]}}
    ]
  }'

Common Use Cases

  • "What's in my project tracker?" โ†’ Query the database, summarize entries
  • "Add a note to my ideas page" โ†’ Append a block to the page
  • "Create a new meeting notes page" โ†’ Create page in specified database
  • "Find my notes about X" โ†’ Search, then read matching pages

Response Format

When reading pages, present content as clean markdown โ€” not raw JSON.

When querying databases, present as a table or list.

Rules

  • Never modify or delete content without explicit user confirmation.
  • For create/update operations, show the user what will be written before executing.
  • If NOTION_API_KEY is not set, guide the user through setup.
  • Parse Notion's block format into readable text โ€” the user shouldn't see raw JSON.
  • Respect the user's Notion structure โ€” don't create pages in unexpected locations.
  • If a page hasn't been shared with the integration, explain how to fix it.
๐Ÿ“ฅ Download All Skills (.zip)๐Ÿงฉ Skill Explorer
๐Ÿ“„ View raw SKILL.md source
--- name: notion-sync description: "Read, create, and update Notion pages and databases. Search content. Sync notes between Notion and workspace." user-invocable: true metadata: openclaw: requires: bins: ["curl"] env: ["NOTION_API_KEY"] author: "pixeyo" homepage: "https://openclawcheatsheet.com/skills" --- # notion-sync Integrate with Notion to read pages, query databases, create new pages, and update existing content. Uses the official Notion API. ## Setup The user needs a Notion integration token: 1. Go to https://www.notion.so/my-integrations 2. Create a new integration (give it read + write access) 3. Copy the token and set: `export NOTION_API_KEY=ntn_xxxxx` 4. Share specific pages/databases with the integration in Notion ## API Base All requests go to `https://api.notion.com/v1/` with headers: ``` Authorization: Bearer ${NOTION_API_KEY} Notion-Version: 2022-06-28 Content-Type: application/json ``` ## Operations ### Search for pages ```bash curl -s -X POST 'https://api.notion.com/v1/search' \ -H "Authorization: Bearer ${NOTION_API_KEY}" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{"query":"SEARCH_TERM","page_size":5}' ``` ### Read a page ```bash # Get page properties curl -s 'https://api.notion.com/v1/pages/PAGE_ID' \ -H "Authorization: Bearer ${NOTION_API_KEY}" \ -H "Notion-Version: 2022-06-28" # Get page content (blocks) curl -s 'https://api.notion.com/v1/blocks/PAGE_ID/children?page_size=100' \ -H "Authorization: Bearer ${NOTION_API_KEY}" \ -H "Notion-Version: 2022-06-28" ``` ### Query a database ```bash curl -s -X POST 'https://api.notion.com/v1/databases/DATABASE_ID/query' \ -H "Authorization: Bearer ${NOTION_API_KEY}" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{"page_size":10}' ``` ### Create a page ```bash curl -s -X POST 'https://api.notion.com/v1/pages' \ -H "Authorization: Bearer ${NOTION_API_KEY}" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{ "parent": {"database_id":"DATABASE_ID"}, "properties": { "Name": {"title": [{"text": {"content": "PAGE TITLE"}}]} }, "children": [ {"object":"block","type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"Page content here."}}]}} ] }' ``` ### Append content to a page ```bash curl -s -X PATCH 'https://api.notion.com/v1/blocks/PAGE_ID/children' \ -H "Authorization: Bearer ${NOTION_API_KEY}" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{ "children": [ {"object":"block","type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"New content appended."}}]}} ] }' ``` ## Common Use Cases - "What's in my project tracker?" โ†’ Query the database, summarize entries - "Add a note to my ideas page" โ†’ Append a block to the page - "Create a new meeting notes page" โ†’ Create page in specified database - "Find my notes about X" โ†’ Search, then read matching pages ## Response Format When reading pages, present content as clean markdown โ€” not raw JSON. When querying databases, present as a table or list. ## Rules - Never modify or delete content without explicit user confirmation. - For create/update operations, show the user what will be written before executing. - If NOTION_API_KEY is not set, guide the user through setup. - Parse Notion's block format into readable text โ€” the user shouldn't see raw JSON. - Respect the user's Notion structure โ€” don't create pages in unexpected locations. - If a page hasn't been shared with the integration, explain how to fix it.