# Notion

> Use the Notion API to create, read, update Notion pages, data sources (databases), and blocks.

- Skill: `xaiht/notion` (Agent Skill)
- Install (CLI): `npx skillmds@latest add xaiht/notion`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xaiht/notion/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: XAIHT (https://skillmd.com/u/xaiht)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/xaiht/notion

---

<!--
═══════════════════════════════════════════════════════════════════
  ✦  T L A M A T I N I  ✦   —   "one who knows"
  Created by  Angela López Mendoza   ·   @angelahack1
  Developer · Architect · Creator of Tlamatini
  Tlamatini Author Banner — do not remove (Angela's name is kept in every build)
═══════════════════════════════════════════════════════════════════
-->

# Notion skill

## Setup

1. Create an integration at https://notion.so/my-integrations.
2. Save the API key under `~/.config/notion/api_key` (no newline).
3. Share the target pages/databases with the integration.

## API basics

All requests:
```
Authorization: Bearer $NOTION_KEY
Notion-Version: 2025-09-03
Content-Type: application/json
```

## Procedure

Map `${input.action}` to the right endpoint:

- `search`       → `POST /v1/search`
- `page-create`  → `POST /v1/pages`
- `page-update`  → `PATCH /v1/pages/{page_id}`
- `db-query`     → `POST /v1/data_sources/{id}/query`
- `block-append` → `PATCH /v1/blocks/{block_id}/children`

Compose the JSON body from `${input.payload}`. Issue with
`chat_agent_apirer`. Return the parsed JSON response.

