Skip to content

Creating Database entries #227

Answered by ramnes
sinbad-sailor asked this question in Q&A
Discussion options

You must be logged in to vote

The error is raised by Notion's API (not the Python client), and is quite explicit:

body.properties.Keep Created Timestamp.date should be an object or `null`, instead was `[{"text":{"content":"2021-05-11T11:00:00.000-04:00"}}]`.

The date fields don't expect a list of objects with a text key.

The documentation for this kind of property shows examples of what they're waiting for: https://developers.notion.com/reference/page-property-values#date

IIRC Notion only gives errors for one field at a time. So when you have validation errors with Notion's API:

  • check the documentation
  • fix the errored field
  • try again until the whole request passes.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sinbad-sailor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants