Notion Workspace (notion-workspace)
Standalone skill for Notion pages, databases, and workspace automation via AISA. No other skill required.
Covers: OAuth connect, tool discovery/execute, Notion ID rules, triggers, and MCP for Notion only.
Quick Start
export AISA_API_KEY="your-key" # Linux/macOS
# $env:AISA_API_KEY = "your-key" # Windows PowerShell
- Base URL:
https://api.aisa.one
- Path prefix:
/apis/v1/composio/...
- Toolkit slug:
notion
- Header:
Authorization: Bearer $AISA_API_KEY
Windows: Use curl.exe in PowerShell.
HTTP patterns (session, OAuth, execute, triggers): references/api_basics.md
When to use
- Search, read, or write Notion pages and databases
- Connect a user/workspace to Notion (OAuth or API key)
- Insert or update database rows, append page content, export Markdown
- Notion triggers, webhooks, or Notion-only MCP server
When NOT to use
- No
AISA_API_KEY — get one at aisa.one
- Direct upstream provider endpoints without the AISA gateway
- Official Notion API only (no AISA gateway)
- Other toolkits (GitHub, Slack, Gmail, etc.) — use a different skill
What Can You Do?
"Connect user alice to Notion via OAuth"
"Search for pages titled Roadmap and export Markdown"
"Add a row to my Tasks database with status In Progress"
"Create a child page under X and append bullet content"
"Set up a trigger when a new row is added to database Y"
Intent → Workflow
| User intent |
Read this |
| API key / session / generic curl |
references/api_basics.md |
| connect / OAuth / authorize Notion |
references/workflow_connect.md |
| search / find page or database |
references/workflow_read.md § Search |
| read markdown / page content / blocks |
references/workflow_read.md § Content |
| query database / filter rows |
references/workflow_database.md § Query |
| create page / write content / append blocks |
references/workflow_write_page.md |
| insert row / update properties |
references/workflow_database.md § Write |
| comments / file upload |
references/notion_intent_to_tool.md |
| page updated / trigger / webhook / MCP |
references/notion_triggers.md |
| errors / 404 / wrong ID type |
references/notion_gotchas.md |
| non-ASCII / Chinese field names / mojibake |
references/notion_gotchas.md § 8 |
| which tool slug? |
references/notion_intent_to_tool.md |
Unclear intent: GET auth/session/info, ensure connected_account_id (N1), then ask read vs write.
Core Workflows
N1 — Connect Notion
GET /auth_configs?toolkit_slug=notion → auth_config_id
- Confirm with user →
POST /connected_accounts/link with user_id
- User opens
redirect_url in browser
- Poll
GET /connected_accounts?user_ids={user_id}&toolkit_slugs=notion every 3–5s until ACTIVE (~2 min max)
- Save
items[].id as connected_account_id
If ACTIVE already exists for same user_id + notion, reuse it.
Details: references/workflow_connect.md
N2 — Discover and read
- Resolve
connected_account_id (N1 if missing)
- Discover IDs:
NOTION_SEARCH_NOTION_PAGE or NOTION_FETCH_DATA
- Read page:
NOTION_GET_PAGE_MARKDOWN or NOTION_FETCH_BLOCK_CONTENTS
- Read database:
NOTION_FETCH_DATABASE → NOTION_QUERY_DATABASE or NOTION_QUERY_DATABASE_WITH_FILTER
Details: references/workflow_read.md
N3 — Write pages and blocks
- Resolve
connected_account_id (N1 if missing)
GET /tools/{tool_slug} — never guess slug; see references/notion_intent_to_tool.md
- Confirm with user before any write
- Create page:
NOTION_CREATE_NOTION_PAGE (parent_id, title) → save returned id
- Add body:
NOTION_ADD_MULTIPLE_PAGE_CONTENT (parent_block_id, content_blocks[])
- Check
successful in response; on false read error
Key param: NOTION_ADD_MULTIPLE_PAGE_CONTENT uses parent_block_id (not page_id) and content_blocks (not child_blocks).
Details: references/workflow_write_page.md
N4 — Database rows
- Check sharing: Confirm the target database (and its parent page chain up to workspace root) is shared with the AISA integration in Notion UI (⋯ → Connections). A 404 on execute almost always means the integration cannot see the resource.
- Always
NOTION_FETCH_DATABASE first
- Confirm with user →
NOTION_INSERT_ROW_DATABASE (properties as list of {name, type, value})
- Update:
NOTION_UPDATE_PAGE; filter: NOTION_QUERY_DATABASE_WITH_FILTER
Details: references/workflow_database.md
N5 — Troubleshoot
references/notion_gotchas.md + references/api_basics.md Troubleshooting table.
Execute pattern (all Notion tools)
curl -X POST "https://api.aisa.one/apis/v1/composio/tools/execute/NOTION_SEARCH_NOTION_PAGE" \
-H "Authorization: Bearer $AISA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connected_account_id": "ca_xxxxxxxx",
"user_id": "alice@example.com",
"arguments": { }
}'
Schema: GET /tools/{tool_slug} → input_parameters.
List tools: GET /tools?toolkit_slug=notion&limit=50
Safety
- Confirm before POST that writes to Notion or changes triggers/webhooks/MCP
- Read-only GET/list/search need no confirmation unless user forbids network
- OAuth
redirect_url must be opened by a human
- Never use mock IDs (
test_nanoid_001)
Reference routing
| Topic |
File |
| Gateway, OAuth, execute, triggers HTTP |
references/api_basics.md |
| Notion pitfalls |
references/notion_gotchas.md |
| Intent → tool_slug |
references/notion_intent_to_tool.md |
| Connect |
references/workflow_connect.md |
| Read / search |
references/workflow_read.md |
| Write pages |
references/workflow_write_page.md |
| Database |
references/workflow_database.md |
| Triggers, MCP |
references/notion_triggers.md |
1---2name: notion-workspace-43description: 'Manage Notion workspace: search pages and databases, read markdown, create pages, insert rows, triggers, MCP. Powered by AISA gateway (Notion toolkit). Requires AISA_API_KEY and curl. Keywords: notion, workspace, page, database, block, markdown, wiki, task board, insert row, OAuth. Use when: the user needs web search, research, source discovery, or content extraction.'4license: MIT5compatibility: Designed for Agent Skills compatible clients such as OpenClaw, Claude Code, Hermes, and GitHub-backed skill catalogs. Requires system binaries curl, environment variables AISA_API_KEY and internet access to api.aisa.one.6metadata:7 source: https://skillmd.com/skills/baofeng-tech/notion-workspace-48 author: AIsa9 version: 1.0.010 homepage: https://aisa.one11 repository: https://github.com/baofeng-tech/agent-skills-so12 tags: x,search,research,aisa13 platforms: agentskills.io,agentskills.so,github14 primary_env: AISA_API_KEY15allowed-tools: Read16---1718# Notion Workspace (`notion-workspace`)1920**Standalone** skill for Notion pages, databases, and workspace automation via AISA. No other skill required.2122Covers: OAuth connect, tool discovery/execute, Notion ID rules, triggers, and MCP for Notion only.2324## Quick Start2526```bash27export AISA_API_KEY="your-key" # Linux/macOS28# $env:AISA_API_KEY = "your-key" # Windows PowerShell29```3031- **Base URL:** `https://api.aisa.one`32- **Path prefix:** `/apis/v1/composio/...`33- **Toolkit slug:** `notion`34- **Header:** `Authorization: Bearer $AISA_API_KEY`3536**Windows:** Use `curl.exe` in PowerShell.3738HTTP patterns (session, OAuth, execute, triggers): `references/api_basics.md`3940## When to use4142- Search, read, or write Notion pages and databases43- Connect a user/workspace to Notion (OAuth or API key)44- Insert or update database rows, append page content, export Markdown45- Notion triggers, webhooks, or Notion-only MCP server4647## When NOT to use4849- No `AISA_API_KEY` — get one at [aisa.one](https://aisa.one)50- Direct upstream provider endpoints without the AISA gateway51- Official Notion API only (no AISA gateway)52- Other toolkits (GitHub, Slack, Gmail, etc.) — use a different skill5354## What Can You Do?5556```text57"Connect user alice to Notion via OAuth"58"Search for pages titled Roadmap and export Markdown"59"Add a row to my Tasks database with status In Progress"60"Create a child page under X and append bullet content"61"Set up a trigger when a new row is added to database Y"62```6364## Intent → Workflow6566| User intent | Read this |67|-------------|-----------|68| API key / session / generic curl | `references/api_basics.md` |69| connect / OAuth / authorize Notion | `references/workflow_connect.md` |70| search / find page or database | `references/workflow_read.md` § Search |71| read markdown / page content / blocks | `references/workflow_read.md` § Content |72| query database / filter rows | `references/workflow_database.md` § Query |73| create page / write content / append blocks | `references/workflow_write_page.md` |74| insert row / update properties | `references/workflow_database.md` § Write |75| comments / file upload | `references/notion_intent_to_tool.md` |76| page updated / trigger / webhook / MCP | `references/notion_triggers.md` |77| errors / 404 / wrong ID type | `references/notion_gotchas.md` |78| non-ASCII / Chinese field names / mojibake | `references/notion_gotchas.md` § 8 |79| which tool slug? | `references/notion_intent_to_tool.md` |8081> Unclear intent: `GET auth/session/info`, ensure `connected_account_id` (N1), then ask read vs write.8283---8485## Core Workflows8687### N1 — Connect Notion88891. `GET /auth_configs?toolkit_slug=notion` → `auth_config_id`902. **Confirm with user** → `POST /connected_accounts/link` with `user_id`913. User opens `redirect_url` in browser924. Poll `GET /connected_accounts?user_ids={user_id}&toolkit_slugs=notion` every 3–5s until `ACTIVE` (~2 min max)935. Save `items[].id` as `connected_account_id`9495If `ACTIVE` already exists for same `user_id` + `notion`, reuse it.9697Details: `references/workflow_connect.md`9899### N2 — Discover and read1001011. Resolve `connected_account_id` (N1 if missing)1022. Discover IDs: `NOTION_SEARCH_NOTION_PAGE` or `NOTION_FETCH_DATA`1033. Read page: `NOTION_GET_PAGE_MARKDOWN` or `NOTION_FETCH_BLOCK_CONTENTS`1044. Read database: `NOTION_FETCH_DATABASE` → `NOTION_QUERY_DATABASE` or `NOTION_QUERY_DATABASE_WITH_FILTER`105106Details: `references/workflow_read.md`107108### N3 — Write pages and blocks1091101. Resolve `connected_account_id` (N1 if missing)1112. `GET /tools/{tool_slug}` — **never guess slug**; see `references/notion_intent_to_tool.md`1123. **Confirm with user** before any write1134. Create page: `NOTION_CREATE_NOTION_PAGE` (`parent_id`, `title`) → save returned `id`1145. Add body: `NOTION_ADD_MULTIPLE_PAGE_CONTENT` (`parent_block_id`, `content_blocks[]`)1156. Check `successful` in response; on false read `error`116117> Key param: `NOTION_ADD_MULTIPLE_PAGE_CONTENT` uses `parent_block_id` (not `page_id`) and `content_blocks` (not `child_blocks`).118119Details: `references/workflow_write_page.md`120121### N4 — Database rows1221231. **Check sharing**: Confirm the target database (and its parent page chain up to workspace root) is shared with the AISA integration in Notion UI (⋯ → Connections). A 404 on execute almost always means the integration cannot see the resource.1242. **Always** `NOTION_FETCH_DATABASE` first1253. **Confirm with user** → `NOTION_INSERT_ROW_DATABASE` (`properties` as list of `{name, type, value}`)1264. Update: `NOTION_UPDATE_PAGE`; filter: `NOTION_QUERY_DATABASE_WITH_FILTER`127128Details: `references/workflow_database.md`129130### N5 — Troubleshoot131132`references/notion_gotchas.md` + `references/api_basics.md` Troubleshooting table.133134---135136## Execute pattern (all Notion tools)137138```bash139curl -X POST "https://api.aisa.one/apis/v1/composio/tools/execute/NOTION_SEARCH_NOTION_PAGE" \140 -H "Authorization: Bearer $AISA_API_KEY" \141 -H "Content-Type: application/json" \142 -d '{143 "connected_account_id": "ca_xxxxxxxx",144 "user_id": "alice@example.com",145 "arguments": { }146 }'147```148149Schema: `GET /tools/{tool_slug}` → `input_parameters`. 150List tools: `GET /tools?toolkit_slug=notion&limit=50`151152---153154## Safety155156- **Confirm** before POST that writes to Notion or changes triggers/webhooks/MCP157- Read-only GET/list/search need no confirmation unless user forbids network158- OAuth `redirect_url` must be opened by a human159- Never use mock IDs (`test_nanoid_001`)160161---162163## Reference routing164165| Topic | File |166|-------|------|167| Gateway, OAuth, execute, triggers HTTP | `references/api_basics.md` |168| Notion pitfalls | `references/notion_gotchas.md` |169| Intent → tool_slug | `references/notion_intent_to_tool.md` |170| Connect | `references/workflow_connect.md` |171| Read / search | `references/workflow_read.md` |172| Write pages | `references/workflow_write_page.md` |173| Database | `references/workflow_database.md` |174| Triggers, MCP | `references/notion_triggers.md` |