Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I create new page with some contents of text #120

Closed
NatLee opened this issue Mar 27, 2022 · 0 comments
Closed

How can I create new page with some contents of text #120

NatLee opened this issue Mar 27, 2022 · 0 comments

Comments

@NatLee
Copy link

NatLee commented Mar 27, 2022

Hi!

I use the script in the example and success to add one new page with my database.
But I want to add some text on page creating like below.

image

My code shows below.

# Initialize the client
notion = Client(auth=NOTION_TOKEN)

# Create a new page
properties = {
    "Name": {"title": [{"text": {"content": "test_title"}}]},
    "Created": {"date": {"start": "2022-03-28"}},
    "Tags": {
      "type": "multi_select",
      "multi_select": [{"name": "Daily"}]
    },
    "Property": {
        "type": "rich_text",
        "rich_text": [
            {
                "type": "text",
                "text": {"content": ""},
            },
        ], 
    }
}

test_ = notion.pages.create(parent={"database_id": DATABASE_ID}, properties=properties)

Thanks for helping.

I'm confuse with the official documentation when I use a method with requests. :'(

Repository owner locked and limited conversation to collaborators Mar 28, 2022
@ramnes ramnes converted this issue into discussion #121 Mar 28, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant