Agent skill
notion-api-4-page-operations
Sub-skill of notion-api: 4. Page Operations.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/business/productivity/notion-api/4-page-operations
SKILL.md
4. Page Operations
4. Page Operations
Create Pages:
# Create page in database
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": "New Task"}}]
},
"Status": {
"select": {"name": "To Do"}
},
"Priority": {
"select": {"name": "High"}
},
"Due Date": {
"date": {"start": "2025-01-20"}
}
}
}' | jq
Python - Page Operations:
# Create page in database
new_page = notion.pages.create(
parent={"database_id": "your-database-id"},
properties={
"Name": {
"title": [{"text": {"content": "New Task"}}]
},
"Status": {
"select": {"name": "To Do"}
},
"Priority": {
"select": {"name": "High"}
},
"Due Date": {
"date": {"start": "2025-01-20", "end": "2025-01-25"}
},
"Tags": {
"multi_select": [
{"name": "development"},
{"name": "urgent"}
]
},
"Assignee": {
"people": [{"id": "user-id"}]
},
"Notes": {
"rich_text": [{"text": {"content": "Task description here"}}]
},
"Completed": {
"checkbox": False
},
"Amount": {
"number": 100
},
"URL": {
"url": "https://example.com"
},
"Email": {
"email": "user@example.com"
}
}
)
print(f"Created page: {new_page['id']}")
# Create page with content (blocks)
new_page = notion.pages.create(
parent={"database_id": "your-database-id"},
properties={
"Name": {"title": [{"text": {"content": "Page with Content"}}]}
},
children=[
{
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [{"type": "text", "text": {"content": "Overview"}}]
}
},
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": "This is the content."}}]
}
},
{
"object": "block",
"type": "to_do",
"to_do": {
"rich_text": [{"type": "text", "text": {"content": "Task item"}}],
"checked": False
}
}
]
)
# Retrieve page
page = notion.pages.retrieve(page_id="page-id")
print(f"Page: {page['properties']['Name']['title'][0]['plain_text']}")
# Update page properties
notion.pages.update(
page_id="page-id",
properties={
"Status": {"select": {"name": "Done"}},
"Completed": {"checkbox": True}
}
)
# Archive page (soft delete)
notion.pages.update(
page_id="page-id",
archived=True
)
# Restore page
notion.pages.update(
page_id="page-id",
archived=False
)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?