notion-api-5-block-operations
Sub-skill of notion-api: 5. Block Operations.
Best use case
notion-api-5-block-operations is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of notion-api: 5. Block Operations.
Teams using notion-api-5-block-operations should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/5-block-operations/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How notion-api-5-block-operations Compares
| Feature / Agent | notion-api-5-block-operations | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of notion-api: 5. Block Operations.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 5. Block Operations
## 5. Block Operations
**Block Types:**
```python
# Paragraph
{
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": "Text content"}}]
}
}
# Headings
{
"type": "heading_1",
"heading_1": {
"rich_text": [{"type": "text", "text": {"content": "Heading 1"}}]
}
}
# Also: heading_2, heading_3
# Bulleted list
{
"type": "bulleted_list_item",
"bulleted_list_item": {
"rich_text": [{"type": "text", "text": {"content": "List item"}}]
}
}
# Numbered list
{
"type": "numbered_list_item",
"numbered_list_item": {
"rich_text": [{"type": "text", "text": {"content": "Item 1"}}]
}
}
# To-do
{
"type": "to_do",
"to_do": {
"rich_text": [{"type": "text", "text": {"content": "Task"}}],
"checked": False
}
}
# Toggle
{
"type": "toggle",
"toggle": {
"rich_text": [{"type": "text", "text": {"content": "Toggle header"}}],
"children": [] # Nested blocks
}
}
# Code block
{
"type": "code",
"code": {
"rich_text": [{"type": "text", "text": {"content": "print('hello')"}}],
"language": "python"
}
}
# Quote
{
"type": "quote",
"quote": {
"rich_text": [{"type": "text", "text": {"content": "Quote text"}}]
}
}
# Callout
{
"type": "callout",
"callout": {
"rich_text": [{"type": "text", "text": {"content": "Important note"}}],
"icon": {"emoji": "💡"}
}
}
# Divider
{
"type": "divider",
"divider": {}
}
# Table of contents
{
"type": "table_of_contents",
"table_of_contents": {}
}
```
**Python - Block Operations:**
```python
# Get page blocks (children)
blocks = notion.blocks.children.list(block_id="page-id")
for block in blocks["results"]:
print(f"Block type: {block['type']}")
# Append blocks to page
notion.blocks.children.append(
block_id="page-id",
children=[
{
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [{"type": "text", "text": {"content": "New Section"}}]
}
},
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [
{"type": "text", "text": {"content": "Some "}},
{"type": "text", "text": {"content": "bold"}, "annotations": {"bold": True}},
{"type": "text", "text": {"content": " text."}}
]
}
},
{
"object": "block",
"type": "bulleted_list_item",
"bulleted_list_item": {
"rich_text": [{"type": "text", "text": {"content": "First item"}}]
}
},
{
"object": "block",
"type": "bulleted_list_item",
"bulleted_list_item": {
"rich_text": [{"type": "text", "text": {"content": "Second item"}}]
}
}
]
)
# Update block
notion.blocks.update(
block_id="block-id",
paragraph={
"rich_text": [{"type": "text", "text": {"content": "Updated content"}}]
}
)
# Delete block
notion.blocks.delete(block_id="block-id")
# Get all blocks recursively
def get_all_blocks(block_id):
"""Recursively get all blocks"""
all_blocks = []
has_more = True
start_cursor = None
while has_more:
response = notion.blocks.children.list(
block_id=block_id,
start_cursor=start_cursor,
page_size=100
)
for block in response["results"]:
all_blocks.append(block)
if block.get("has_children"):
children = get_all_blocks(block["id"])
all_blocks.extend(children)
has_more = response["has_more"]
start_cursor = response.get("next_cursor")
return all_blocks
all_blocks = get_all_blocks("page-id")
print(f"Total blocks: {len(all_blocks)}")
```Related Skills
memory-bridge-operations
Operate and recover the Hermes-to-repo memory bridge: drift checks, quality gate, bridge commits, push verification, and stash recovery when pre-bridge scripts fail after generating outputs.
handle-session-overlay-blocking
Technique for dismissing overlay dialogs that freeze rendering and block form interaction in web automation
handle-popup-blocked-pdf-downloads
Recover from automation-blocking PDF popups by capturing page data and escalating to manual download
handle-browser-automation-financial-site-blocks
Workflow for working around Chrome extension blocks on financial sites during data collection tasks
handle-blocked-financial-sites-workaround
Workflow for accessing financial account data when browser automation is blocked on brokerage sites
handle-blocked-financial-sites-data-export
Workflow for extracting data from blocked financial sites when browser automation is restricted
blocker-reporting-outcome-validation
Pattern for closing issues where the deliverable is documented blockers rather than feature completion
workspace-hub-sync-concurrent-writer-blocks
Handle repository_sync cleanup when workspace-hub root is being mutated by concurrent Codex/Codex/Gemini sessions.
overnight-verify-close-and-blocker-conversion
Use overnight Codex lanes to clear stale-open GitHub issues by verification-first closure, and convert blocked PR-repair attempts into dedicated blocker issues instead of speculative edits.
blocked-branch-preserve-tag-cleanup
Safely clean stale local branches that cannot be merged by preserving them with local tags before deletion
notion
Notion API for creating and managing pages, databases, and blocks via curl. Search, create, update, and query Notion workspaces directly from the terminal.
github-issue-lifecycle-operations
Class-level GitHub issue lifecycle operations: issue creation, planning/execution routing, labels, evidence fields, roadmap anchors, closeout races, and visual planning.