-
Hi everyone, I have a Notion database with pages. In one of the pages I'd like to update the value of a property called "Test" page = notion.pages.retrieve(page_id)
page['properties']['Test']['rich_text'][0]['plain_text'] = "My updated value" So far so good. If I run these two lines in the debugger, I see the variable being updated in the VS Code debugger. But how do I actually send the update back to the Notion API? There seems to be an Could anyone give me some pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey there! Yes, you want to use the You can find its Python documentation here, and the reference API documentation here. TL;DR, you probably want something like this: notion.pages.update(
page_id,
properties={
"Test": {
"rich_text": [{"type": "text", "text": {"content": "My updated value"}}]
}
},
) |
Beta Was this translation helpful? Give feedback.
Hey there!
Yes, you want to use the
notion.pages.update(...)
method.You can find its Python documentation here, and the reference API documentation here.
TL;DR, you probably want something like this: