Skip to content

Add properties param to notion_create_page/notion_update_page for real DB column support - #25

Merged
allocsys merged 3 commits into
mainfrom
fix/notion-database-properties
Jul 27, 2026
Merged

Add properties param to notion_create_page/notion_update_page for real DB column support#25
allocsys merged 3 commits into
mainfrom
fix/notion-database-properties

Conversation

@allocsys

Copy link
Copy Markdown
Owner

Problem

notion_create_page / notion_update_page (and their batch variants) only ever set the page title property. Everything else — entity_id, status, relations — got written as plain-text marker paragraphs in the page body instead of real Notion database columns (select/rich_text/url/etc).

Concretely: creating/updating rows in a database like a Job Leads tracker (with Status, Category, Comp / Rate, Payment Method, Apply Link columns) left every one of those columns empty — the actual info only existed as text in the page body.

Fix

Added an optional properties param (raw Notion property-value object) to:

  • doCreatePage / notion_create_page / notion_create_pages_batch
  • doUpdatePage / notion_update_page / notion_update_pages_batch

Callers can now pass e.g.:

{ "Status": { "select": { "name": "open" } }, "Comp / Rate": { "rich_text": [{ "text": { "content": "$10-60/hr" } }] } }

and it's merged with the existing title-only properties object before the request to Notion. On create, it's merged alongside the Name title property for database parents (ignored for page parents, which have no custom properties). On update, it's merged with any title change into the same PATCH, and correctly deferred to the final PATCH when archived: true is also set (mirrors the existing title-deferral logic, since Notion rejects block edits — but not property/archive PATCHes — on an already-archived page).

No changes needed in client.jsnotionRequest already passes through arbitrary JSON bodies.

Testing

Manually verified against a real Notion database (Job Leads tracker) — properties like Status (select), Comp / Rate (rich_text), and Apply Link (url) now populate correctly instead of staying empty.

allocsys added 3 commits July 27, 2026 03:03
…l DB property support

Previously these tools only ever set the title property -- everything else
(entity_id/status/relations) got shoved into text marker blocks in the page
body instead of actual Notion database columns (select/rich_text/url/etc).
This adds an optional `properties` param (raw Notion property-value object)
to notion_create_page, notion_create_pages_batch, notion_update_page, and
notion_update_pages_batch so callers can set real database column values
directly, merged alongside the existing title/marker handling.
…support

The per-param `properties` descriptions were already accurate, but the
top-level tool summaries for notion_create_page, notion_create_pages_batch,
and notion_update_pages_batch didn't mention the new capability at all --
easy to miss when just skimming available tools. notion_update_page's
top-level text already said "title or properties" (now actually true),
tightened slightly for clarity.
The handler already correctly remaps type: "owner" to "all" when falling
back to the /orgs/:org/repos endpoint (that endpoint has no "owner" value),
but the param's description didn't mention this, so a caller filtering by
type: "owner" against an org would silently get all repos back with no
indication why.
@allocsys
allocsys merged commit f503fcf into main Jul 27, 2026
2 checks passed
@allocsys
allocsys deleted the fix/notion-database-properties branch July 27, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant