Write to Notion
Create pages, database entries, inline databases, or update existing content
3
Determine the operation and parentType:
- 'database' — add entry to existing database
- 'page' — create page under another page
- 'inline_database' — create new database inside a page
- 'update' — modify existing page
Resolve the target from
Connection Profiles or search if needed.
4
Build the content:
- For database entries: properties JSON matching the database schema
- For pages: {title, icon} and optional blocks array
- For inline databases: {title, icon, schema} where schema defines columns
- For rich content: construct blocks array and write to session/notion-content.json
If content includes inline databases: create the page first, then call the script
again with parentType 'inline_database' for each database. Inline databases
cannot be created as blocks—they require a separate API call after the page exists.
5
Preview what you'll create/update and get confirmation before proceeding.
7
Confirm success and share the URL.
To run this task you must have the following required information:
What to create or update, target location, and content
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` (Interpretation and property mapping)
2. [Read Notion API Reference]: Read the documentation in: `./skills/sauna//resources/context/notion.workspace.reference.md` (Properties and block types)
3. Determine the operation and parentType:
- 'database' — add entry to existing database
- 'page' — create page under another page
- 'inline_database' — create new database inside a page
- 'update' — modify existing page
Resolve the target from `./documents/connections/[service-name].md` or search if needed.
4. Build the content:
- For database entries: properties JSON matching the database schema
- For pages: {title, icon} and optional blocks array
- For inline databases: {title, icon, schema} where schema defines columns
- For rich content: construct blocks array and write to session/notion-content.json
If content includes inline databases: create the page first, then call the script
again with parentType 'inline_database' for each database. Inline databases
cannot be created as blocks—they require a separate API call after the page exists.
5. Preview what you'll create/update and get confirmation before proceeding.
6. [Gather Arguments: Create/Update Notion Content] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `parentType`: 'database', 'page', 'inline_database', or 'update'
- `parentOrPageId`: Parent/page ID
- `propertiesJson`: Properties JSON
- `contentPath`: session/notion-content.json or empty
7. [Run Code: Create/Update Notion Content]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/notion.workspace.write/preview,
"args": [
"parentType",
"parentOrPageId",
"propertiesJson",
"contentPath"
]
},
"packages": null
}
```
8. Confirm success and share the URL.