---
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 | &#x2714; | Token |
  | Parent | --base | String | &#x2714; | Parent database ID |
  | Data | --data | Map Of KeyAndValue | &#x2714; | Properties map |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Notion



```bsl title="1C:Enterprise/OneScript code example"
    Token  = "secret_9RsfMrRMqZwqp0Zl0B...";
    Base   = "2c582aa7-fc4e-8189-8d86-cb479d8efdf9";
    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);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint notion CreatePageInDatabase \
             --token "***" \
             --base "2c582aa7-fc4e-8102-bf01-e0852eafa54f" \
             --data "{'Name':'LLC Vector','Description':'OurFirstClient','Number':'1','CreationDate':'12/10/2025 19:37:10','Image':{'Logo':'https://hut.openintegrations.dev/test_data/picture.jpg'},'Active':true,'Website':'https://vector.ru','Email':'mail@vector.ru','Phone':'***','Status':'New'}"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint notion CreatePageInDatabase ^
             --token "***" ^
             --base "2c582aa7-fc4e-8102-bf01-e0852eafa54f" ^
             --data "{'Name':'LLC Vector','Description':'OurFirstClient','Number':'1','CreationDate':'12/10/2025 19:37:10','Image':{'Logo':'https://hut.openintegrations.dev/test_data/picture.jpg'},'Active':true,'Website':'https://vector.ru','Email':'mail@vector.ru','Phone':'***','Status':'New'}"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "object": "page",
 "id": "2c582aa7-fc4e-8172-93e8-d4123f6aac51",
 "created_time": "2025-12-10T19:37:00Z",
 "last_edited_time": "2025-12-10T19:37: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": "2c582aa7-fc4e-8102-bf01-e0852eafa54f"
 },
 "archived": false,
 "in_trash": false,
 "is_locked": false,
 "properties": {
  "Status": {
   "id": "Ki%5D%3D",
   "type": "select",
   "select": {
    "id": "70f27d60-9008-4f94-921e-e0a8600095ef",
    "name": "New",
    "color": "green"
   }
  },
  "User": {
   "id": "WCE%7D",
   "type": "people",
   "people": []
  },
  "Number": {
   "id": "YE%3Ad",
   "type": "number",
   "number": 1
  },
  "Description": {
   "id": "dx%3DX",
   "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
    }
   ]
  },
  "CreationDate": {
   "id": "eD~z",
   "type": "date",
   "date": {
    "start": "2025-12-10T07:37:00+00:00",
    "end": null,
    "time_zone": null
   }
  },
  "Email": {
   "id": "fc%40n",
   "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
    }
   ]
  },
  "Active": {
   "id": "oZ%40b",
   "type": "checkbox",
   "checkbox": true
  },
  "Image": {
   "id": "oZNU",
   "type": "files",
   "files": [
    {
     "name": "Logo",
     "type": "external",
     "external": {
      "url": "https://hut.openintegrations.dev/test_data/picture.jpg"
     }
    }
   ]
  },
  "Phone": {
   "id": "urz%3B",
   "type": "phone_number",
   "phone_number": "***"
  },
  "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-2c582aa7fc4e817293e8d4123f6aac51",
 "public_url": null,
 "request_id": "1caa4b45-9398-4da0-a203-9018877876a3"
}
```
