Skip to main content

Create page in database

Creates a page in the parent database

Function CreatePageInDatabase(Val Token, Val Parent, Val Data) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Parent--baseStringParent database ID
Data--dataMap Of KeyAndValueProperties map

Returns: Map Of KeyAndValue - serialized JSON response from Notion


1C:Enterprise/OneScript code example
    Token  = "secret_9RsfMrRMqZwqp0Zl0B...";
Base = "26e82aa7-fc4e-81d1-af10-fbd1542ade36";
Image_ = "https://hut.openintegrations.dev/test_data/picture.jpg"; // URL, Binary Data or File path

Image = New Map;
Image.Insert("Logo", Image_);

Properties = New Map;
Properties.Insert("Name" , "LLC Vector");
Properties.Insert("Description" , "OurFirstClient");
Properties.Insert("Number" , 1);
Properties.Insert("CreationDate", OPI_Tools.GetCurrentDate());
Properties.Insert("Image" , Image);
Properties.Insert("Active" , True);
Properties.Insert("Website" , "https://vector.ru");
Properties.Insert("Email" , "mail@vector.ru");
Properties.Insert("Phone" , "88005553535");
Properties.Insert("Status" , "New");

Result = OPI_Notion.CreatePageInDatabase(Token, Base, Properties);
    oint notion CreatePageInDatabase \
--token "***" \
--base "26f82aa7-fc4e-8100-8c40-ec5a1dfa460e" \
--data "{'Name':'LLC Vector','Description':'OurFirstClient','Number':'1','CreationDate':'09/15/2025 22:34:45','Image':{'Logo':'https://hut.openintegrations.dev/test_data/picture.jpg'},'Active':true,'Website':'https://vector.ru','Email':'mail@vector.ru','Phone':'88005553535','Status':'New'}"
Result
{
"object": "page",
"id": "26f82aa7-fc4e-81b0-8009-cc3bedd4ad56",
"created_time": "2025-09-15T22:34:00Z",
"last_edited_time": "2025-09-15T22:34:00Z",
"created_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"last_edited_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"cover": null,
"icon": null,
"parent": {
"type": "database_id",
"database_id": "26f82aa7-fc4e-8100-8c40-ec5a1dfa460e"
},
"archived": false,
"in_trash": false,
"is_locked": false,
"properties": {
"Email": {
"id": "%3AGLR",
"type": "rich_text",
"rich_text": [
{
"type": "text",
"text": {
"content": "mail@vector.ru",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "mail@vector.ru",
"href": null
}
]
},
"User": {
"id": "%40lUr",
"type": "people",
"people": []
},
"Description": {
"id": "OQ_%60",
"type": "rich_text",
"rich_text": [
{
"type": "text",
"text": {
"content": "OurFirstClient",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "OurFirstClient",
"href": null
}
]
},
"Status": {
"id": "Qt%5EW",
"type": "select",
"select": {
"id": "d6f95a10-9a0e-492a-84a9-762c1e53901d",
"name": "New",
"color": "green"
}
},
"Number": {
"id": "%5DJaU",
"type": "number",
"number": 1
},
"CreationDate": {
"id": "%5EeGi",
"type": "date",
"date": {
"start": "2025-09-15T10:34:00+00:00",
"end": null,
"time_zone": null
}
},
"Phone": {
"id": "bX%3CC",
"type": "phone_number",
"phone_number": "88005553535"
},
"Image": {
"id": "h%3D%3Bs",
"type": "files",
"files": [
{
"name": "Logo",
"type": "external",
"external": {
"url": "https://hut.openintegrations.dev/test_data/picture.jpg"
}
}
]
},
"Active": {
"id": "~Y%3Cb",
"type": "checkbox",
"checkbox": true
},
"Name": {
"id": "title",
"type": "title",
"title": [
{
"type": "text",
"text": {
"content": "LLC Vector",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "LLC Vector",
"href": null
}
]
}
},
"url": "https://www.notion.so/LLC-Vector-26f82aa7fc4e81b08009cc3bedd4ad56",
"public_url": null,
"request_id": "95f2d4fa-e9e3-48bb-ae78-1e636f4b6cae"
}