task icon Task

Create Notion Page

Create a new page in Notion - workspace page, child page, or database entry

Requirements
Content to create (title, body text, or rough notes), destination (workspace, under a specific page, or in a database), optional properties for database entries
3

Determine the destination type:

  • Workspace page: Standalone page at workspace root
  • Child page: Under an existing page
  • Database entry: As a row in a database (requires matching properties)

If destination is unclear, check stateService Profiles for:

  • Active databases (if content matches a database structure)
  • Recent pages (if they mention a parent page)

If still unclear, ask: "Should this be a standalone page, or do you want to add it somewhere specific?"

4

For database entries:

6

With the schema, prepare the database entry:

View-critical properties (MUST populate for entries to appear correctly):

  • Calendar/Timeline entries: Populate the date property. If multiple date properties exist, ask which one to use or infer from property names ("Date", "Due Date", "Event Date")
  • Board entries: Populate the status or select property used for column grouping
  • For dates: Always include start (required); add end for date ranges

Match property names EXACTLY as they appear in the schema (case-sensitive).
Ask for any required or view-critical properties not provided by the user.

For pages (non-database):

  • Structure content with appropriate blocks (headings, paragraphs, lists)
  • Use callouts for important notes
  • Add code blocks for any code content
7

Write a preview draft with _action frontmatter:


_action:
label: "Create page"
prompt: "Create this Notion page using the content below. Convert to Notion blocks."
isComplete: false

Destination: [workspace / parent page name / database name]
Title: [page title]
Properties: (for database entries)

Content

[page content in markdown]

Sauna displays this as a preview card with a "Create page" button.
User can edit the content, then click to create.

8

Create the page using the Notion API.

On success: Share the page URL and confirm what was created.
On error: Explain the issue (common: page not shared with integration, property mismatch).

                    To run this task you must have the following required information:

> Content to create (title, body text, or rough notes), destination (workspace, under a specific page, or in a database), optional properties for database entries

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 CONSECUTIVE read steps in a row, read them all at once (in parallel). Otherwise, do not read a file until you reach that step.

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

## Steps

1. [Read External Actions Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/sauna.actions.external.md` (Preview UI pattern for external actions)

2. [Read Notion Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/content.notion.guide.md` (Notion API reference for page creation)

3. Determine the destination type:
- **Workspace page**: Standalone page at workspace root
- **Child page**: Under an existing page
- **Database entry**: As a row in a database (requires matching properties)

If destination is unclear, check `documents/user/services/*.md` for:
- Active databases (if content matches a database structure)
- Recent pages (if they mention a parent page)

If still unclear, ask: "Should this be a standalone page, or do you want to add it somewhere specific?"


4. For database entries:
- Identify the target database from the profile's Quick Access section
- Check `documents/user/services/*.md` for the database's property schema
- If schema not in profile or stale, run `skills/sauna/[skill_id]/scripts/notion.database.schema.js` to fetch it


5. [Gather Arguments: Get Notion Database Schema] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `databaseId`: database ID from destination

6. [Run Code: Get Notion Database Schema]: Call `run_script` with:

```json
{
  "file": {
    "path": https://sk.ills.app/code/notion.database.schema/preview,
    "args": [
      "databaseId"
    ]
  },
  "packages": null
}
```

7. With the schema, prepare the database entry:

**View-critical properties** (MUST populate for entries to appear correctly):
- **Calendar/Timeline entries**: Populate the date property. If multiple date properties exist, ask which one to use or infer from property names ("Date", "Due Date", "Event Date")
- **Board entries**: Populate the status or select property used for column grouping
- **For dates**: Always include `start` (required); add `end` for date ranges

Match property names EXACTLY as they appear in the schema (case-sensitive).
Ask for any required or view-critical properties not provided by the user.

For pages (non-database):
- Structure content with appropriate blocks (headings, paragraphs, lists)
- Use callouts for important notes
- Add code blocks for any code content


8. Write a preview draft with _action frontmatter:

---
_action:
  label: "Create page"
  prompt: "Create this Notion page using the content below. Convert to Notion blocks."
  isComplete: false
---

**Destination:** [workspace / parent page name / database name]
**Title:** [page title]
**Properties:** (for database entries)
- [property]: [value]

## Content

[page content in markdown]

Sauna displays this as a preview card with a "Create page" button.
User can edit the content, then click to create.


9. Create the page using the Notion API.

On success: Share the page URL and confirm what was created.
On error: Explain the issue (common: page not shared with integration, property mismatch).