task icon Task

Read Notion Content

Read and understand the content of a Notion page

Requirements

Page name, ID, or URL to read

2
instruction icon Resolve the page. If user provides a URL, extract the page ID (the 32-character hex string before the query params). If they mention a page by name, check uiConnection Profiles or search for it.
4
instruction icon Analyze the page structure. Identify main sections (headings), lists of items, tasks, and key content. Summarize the page's purpose and structure first.
5
instruction icon Present content based on what user needs. If they asked 'what's in X', give a structural overview. If they asked for specific info, extract and present just that. Don't dump raw block data.
6
instruction icon For long pages, summarize sections: 'This page has 4 main sections: Overview, Requirements, Timeline, Notes. Want me to expand any section?'
To run this task you must have the following required information:


Page name, ID, or URL to read


If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).

Add all steps to your todo list now and begin executing.

## Steps

1. [Read Notion Agent Rules]: Read the documentation in: `./skills/sauna//resources/context/notion.workspace.rule.md` (Content presentation patterns)

2. Resolve the page. If user provides a URL, extract the page ID (the 32-character hex string before the query params). If they mention a page by name, check `./documents/connections/[service-name].md` or search for it.

3. [Gather Arguments: Read Notion Page Content] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `pageId`: Page ID
- `outputPath` (default: "session/notion-content.json"): session/notion-content.json
- `maxDepth` (default: "2"): 2 for overview, 3 for deep dive

4. [Run Code: Read Notion Page Content]: Call `run_script` with:

```json
{
  "file": {
    "path": https://sk.ills.app/code/notion.workspace.read/preview,
    "args": [
      "pageId",
      "outputPath",
      "maxDepth"
    ]
  },
  "packages": null
}
```

5. Analyze the page structure. Identify main sections (headings), lists of items, tasks, and key content. Summarize the page's purpose and structure first.

6. Present content based on what user needs. If they asked 'what's in X', give a structural overview. If they asked for specific info, extract and present just that. Don't dump raw block data.

7. For long pages, summarize sections: 'This page has 4 main sections: Overview, Requirements, Timeline, Notes. Want me to expand any section?'