Notion

From Arvo-AI/aurora · View interactive version

Notion is an AI agent skill from the GitHub repository Arvo-AI/aurora. Notion workspace integration for searching pages, managing databases, creating postmortems, and exporting RCA findings

How to use this skill

Skill file

Notion Integration

Overview

Notion workspace integration for searching, reading, and managing pages, databases, blocks, comments, users, and files. Also supports exporting Aurora RCA postmortems and action items to Notion databases.

Notion is a REMOTE service. Use ONLY the Notion tools listed below -- never shell commands or local file access.

Instructions

1. Discovery -- Always Start Here

Before any operation, search to understand the workspace layout:

notion_search(query='...', types=['page']) -- find pages by title keyword

notion_search(query='...', types=['database']) -- find databases by title keyword

notion_search(query='...', max_results=25) -- search all object types (pages + databases)

To read a specific page or database:

notion_fetch(url_or_id='<page_url_or_uuid>', max_length=5000) -- returns page body as markdown

2. Pages

Create pages:

notion_create_pages(pages=[{title, parent_page_id|parent_database_id, markdown, icon, cover, properties}])

Update a page:

notion_update_page(page_id, properties=None, icon=None, cover=None, archived=None, markdown=None, markdown_mode='append')

Append content:

notion_append_to_page(page_id, markdown) -- append markdown to the end of a page.

Move pages:

notion_move_pages(page_ids=[...], new_parent_id) -- move one or more pages under a new parent page.

Duplicate a page:

notion_duplicate_page(page_id, new_parent_id=None) -- deep-copy (title, icon, cover, markdown body).

Trash (archive) a page:

notion_trash_page(page_id) -- soft-delete; recoverable from Notion trash UI.

3. Blocks

List child blocks:

notion_get_block_children(block_id, max_results=100, start_cursor=None)

Update a block:

notion_update_block(block_id, block={...}) -- pass partial block payload.

Delete a block:

notion_delete_block(block_id) -- permanent deletion from API (irreversible). Use with extreme care; prefer notion_trash_page for pages.

4. Databases

Create a database:

notion_create_database(parent_page_id, title, properties, icon=None, cover=None)

Update database metadata:

notion_update_database(database_id, title=None, description=None, icon=None, cover=None, archived=None)

Update database schema:

notion_update_database_properties(database_id, properties={...}) -- add, rename, or remove columns.

Query a database:

notion_query_database(database_id, filter=None, sorts=None, max_results=25, start_cursor=None)

Filter Syntax (Notion API format)

Filters use property name + type + condition:

Text (title, rich_text, url, email, phone_number):

{"property": "Name", "title": {"contains": "incident"}}
{"property": "Description", "rich_text": {"is_not_empty": true}}

Number:

{"property": "Priority", "number": {"greater_than": 3}}
{"property": "Score", "number": {"equals": 100}}

Select:

{"property": "Status", "select": {"equals": "Done"}}
{"property": "Type", "select": {"does_not_equal": "Bug"}}

Multi-select:

{"property": "Tags", "multi_select": {"contains": "P0"}}

Checkbox:

{"property": "Completed", "checkbox": {"equals": true}}

Date:

{"property": "Due", "date": {"on_or_before": "2025-01-15"}}
{"property": "Created", "date": {"after": "2025-01-01"}}
{"property": "Due", "date": {"past_week": {}}}
{"property": "Due", "date": {"next_month": {}}}

Date conditions: equals, before, after, on_or_before, on_or_after, is_empty, is_not_empty, past_week, past_month, past_year, next_week, next_month, next_year.

Timestamp (created_time / last_edited_time):

{"timestamp": "created_time", "created_time": {"on_or_before": "2025-01-13"}}

Relation:

{"property": "Tasks", "relation": {"contains": "<page_uuid>"}}

Compound filters (AND / OR):

{"and": [
  {"property": "Status", "select": {"equals": "Active"}},
  {"property": "Priority", "number": {"greater_than": 2}}
]}
Sort Syntax

By property:

[{"property": "Priority", "direction": "descending"}]

By timestamp:

[{"timestamp": "last_edited_time", "direction": "descending"}]

Multiple sorts are applied in order (first sort is primary).

5. Users & People

notion_list_users(max_results=100, start_cursor=None) -- list all workspace members (people + bots).

notion_get_user(target_user_id) -- fetch a single user by ID.

notion_get_self() -- get the Aurora bot user (the integration itself).

notion_find_person(name_or_email) -- find a person:

notion_list_teamspaces() -- best-effort listing of teamspaces (uses workspace search internally). Often empty on Free/Plus plans.

6. Comments

Post a comment:

notion_create_comment(text, page_id=None, block_id=None, discussion_id=None)

Read comments:

notion_get_comments(page_id_or_block_id, include_resolved=False)

7. Files

Upload a file:

notion_upload_file(file_path_or_url, filename=None, content_type=None)

List uploads:

notion_list_file_uploads(max_results=25, start_cursor=None) -- list recent file uploads by this integration.

8. Custom Emojis

notion_list_custom_emojis() -- list custom emojis in the workspace. Returns supported: false on plans without this feature.

9. Data Sources (Plan-Gated)

These endpoints require specific Notion plans. All return {"supported": false} gracefully on workspaces without access.

notion_create_data_source(payload) -- create a data source (full payload passed through).

notion_get_data_source(data_source_id) -- fetch by ID.

notion_update_data_source(data_source_id, updates) -- update attributes.

notion_update_data_source_properties(data_source_id, properties) -- update schema.

notion_query_data_source(data_source_id, filter=None, sorts=None, max_results=25, start_cursor=None) -- query with filter/sort/pagination.

notion_list_data_source_templates(data_source_id) -- list templates.

10. Database Views (Plan-Gated)

These endpoints require specific Notion plans. All return {"supported": false} gracefully on workspaces without access.

notion_create_view(payload) -- create a view on a database.

notion_update_view(view_id, updates) -- update filters, sorts, visible properties.

notion_delete_view(view_id) -- irreversible deletion of a view.

notion_list_database_views(database_id) -- list all views on a database.

notion_query_view(view_id, filter=None, sorts=None, max_results=25, start_cursor=None) -- query through a view.

11. RCA Postmortem Export (Aurora-Specific)

Export a postmortem:

notion_export_postmortem(incident_id, database_id, action_items_database_id=None)

Create action items:

notion_create_action_items(incident_id, action_items_database_id, assignee_hints=None)

RCA Investigation Workflow

IMPORTANT: You MUST search Notion early in every RCA investigation. The workspace contains past postmortems, runbooks, and action items that provide critical historical context. Do NOT skip this step.

IMPORTANT: During RCA, Notion is READ-ONLY. Do NOT create pages, export postmortems, create action items, or write to Notion. The engineer reviews your findings and exports via the UI after approving.

Step 1 (EARLY -- do this within your first 3 tool calls) -- Search Notion for historical context:

notion_search(query='<service_name>', types=['page']) to find past postmortems or runbooks related to the affected service.

Also try: notion_search(query='<alert_type_or_keyword>') for broader matches.

Step 2 -- Query postmortem databases for patterns:

notion_search(query='postmortem', types=['database']) to find postmortem databases, then:

notion_query_database(database_id='...', filter={"property": "Service", "select": {"equals": "<service_name>"}}, sorts=[{"timestamp": "created_time", "direction": "descending"}])

Step 3 -- Read relevant past postmortems:

notion_fetch(url_or_id='<page_id>', max_length=10000) to get full postmortem content. Past incidents on the same service often reveal recurring root causes.

Important Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.