--- sidebar_position: 2 description: Create page in database and other functions to work with Notion in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Notion] --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Create page in database Creates a page in the parent database `Function CreatePageInDatabase(Val Token, Val Parent, Val Data) Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | Token | --token | String | ✔ | Token | | Parent | --base | String | ✔ | Parent database ID | | Data | --data | Map Of KeyAndValue | ✔ | Properties map | Returns: Map Of KeyAndValue - serialized JSON response from Notion
```bsl title="1C:Enterprise/OneScript code example" Token = "secret_9RsfMrRMqZwqp0Zl0B..."; Base = "1f982aa7-fc4e-81be-9637-f255d66e696d"; Image_ = "https://api.athenaeum.digital/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("Status" , "Regular"); 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); ``` ```bash # JSON data can also be passed as a path to a .json file oint notion CreatePageInDatabase \ --token "***" \ --base "1fa82aa7-fc4e-81ec-928b-ceb0b54079c8" \ --data "{'Name':'LLC Vector','Description':'OurFirstClient','Number':1,'Status':'New','CreationDate':'2025-05-21T09:22:13.1567602Z','Image':{'Logo':'https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg'},'Active':true,'Website':'https://vector.ru','Email':'mail@vector.ru','Phone':'88005553535'}" ``` ```batch :: JSON data can also be passed as a path to a .json file oint notion CreatePageInDatabase ^ --token "***" ^ --base "1fa82aa7-fc4e-81ec-928b-ceb0b54079c8" ^ --data "{'Name':'LLC Vector','Description':'OurFirstClient','Number':1,'Status':'New','CreationDate':'2025-05-21T09:22:13.1567602Z','Image':{'Logo':'https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg'},'Active':true,'Website':'https://vector.ru','Email':'mail@vector.ru','Phone':'88005553535'}" ``` ```json title="Result" { "object": "page", "id": "11a82aa7-fc4e-8196-95c5-d8db91cb3fb1", "created_time": "2024-10-09T06:14:00Z", "last_edited_time": "2024-10-09T06:14: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": "11a82aa7-fc4e-8138-a724-ee8786147d82" }, "archived": false, "in_trash": false, "properties": { "Description": { "id": "%3COFd", "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 } ] }, "Phone": { "id": "Ne%7DI", "type": "phone_number", "phone_number": "88005553535" }, "CreationDate": { "id": "P%3Doo", "type": "date", "date": { "start": "2024-10-09T12:14:00+03:00", "end": null, "time_zone": null } }, "Active": { "id": "Ub%7C%5D", "type": "checkbox", "checkbox": true }, "Number": { "id": "%5Dotl", "type": "number", "number": 1 }, "Email": { "id": "%60%7DN%3F", "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 } ] }, "Status": { "id": "bAZ%7D", "type": "select", "select": { "id": "0e626378-0386-4985-88de-b747968504e7", "name": "New", "color": "green" } }, "User": { "id": "%7B%3Bsu", "type": "people", "people": [] }, "Image": { "id": "%7B%3F%5B%3F", "type": "files", "files": [ { "name": "Logo", "type": "external", "external": { "url": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg" } } ] }, "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-11a82aa7fc4e819695c5d8db91cb3fb1", "public_url": null, "request_id": "32934a59-8bbd-495e-b65a-559df6d5762f" } ```