0

I'm using notion-sdk-py package to interact with Notion SDK.

  • I want to change property type multi_select -> rich_text (text)
  • Prop is multi_select type property

exmaple enter image description here

My code:

from notion_client import Client

notion = Client(auth=settings["auth"])
any_db = notion.databases.query(settings["databases"]["any"])
page = any_db["results"][0]

notion.pages.update(
    page["id"], 
    properties={"Prop": {"type": "rich_text", "rich_text": []}}
)

# Also tried this
notion.pages.update(
    order["id"],
    properties={
        "Prop": {
            "type": "rich_text",
            "rich_text": [{
                "type": "text",
                "text": {
                    "content": "yemreak.com"
                },
                "href": None
            }]
        }
    }
)

# Both of them raise same error
# notion_client.errors.APIResponseError: Prop is expected to be multi_select.

Additional Resources

yEmreAk.com
  • 3,278
  • 2
  • 18
  • 37

0 Answers0