Description
notion page set <id> "MySelect=" (empty value) cannot be used to clear a select property. The CLI sends {"select": {"name": ""}} to the Notion API, which is rejected with:
validation_error: body failed validation. Fix one:
body.properties.<Field>.select.id should be defined, instead was `undefined`.
body.properties.<Field>.select.name should be populated, instead was "".
To clear a select field in Notion, the body must be {"select": null}.
Repro
# Create a page in a DB with a select property "Status" set to some value
notion page set <page-id> "Status="
# → validation_error: body.properties.Status.select.name should be populated, instead was ""
Workaround
Drop down to the raw API:
notion api PATCH /v1/pages/<page-id> --body '{"properties":{"Status":{"select":null}}}'
Expected
The CLI's page set should map Key= (or Key="") for select / multi_select / status / date / etc. properties to a null value in the API call. This is a common operation (e.g., un-classifying a row).
Environment
- notion-cli v0.7.0
- Same behavior observed for
multi_select clearing via empty value
Impact
Real bug — clearing a select is a normal operation but currently requires falling back to notion api PATCH with hand-rolled JSON.
Description
notion page set <id> "MySelect="(empty value) cannot be used to clear aselectproperty. The CLI sends{"select": {"name": ""}}to the Notion API, which is rejected with:To clear a
selectfield in Notion, the body must be{"select": null}.Repro
Workaround
Drop down to the raw API:
Expected
The CLI's
page setshould mapKey=(orKey="") for select / multi_select / status / date / etc. properties to anullvalue in the API call. This is a common operation (e.g., un-classifying a row).Environment
multi_selectclearing via empty valueImpact
Real bug — clearing a select is a normal operation but currently requires falling back to
notion api PATCHwith hand-rolled JSON.