1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-25 21:39:21 +02:00
Vitaly the Alpaca (bot) 8c19a52377 Main build (Jenkins)
2024-10-02 20:28:02 +03:00

1.9 KiB

sidebar_position
1

Create page

Creates a child page above another parent page

Function CreatePage(Val Token, Val Parent, Val Title) Export

Parameter CLI option Type Description
Token --token String Token
Parent --page String Parent ID
Title --title String Page title

Returns: Map Of KeyAndValue - Serialized JSON response from Notion


    Token  = "secret_9RsfMrRMqZwqp0Zl0B...";
    Parent = "5dd94c34fab04bff986b7511c0779f77";
    Title  = "TestTitle";

    Result = OPI_Notion.CreatePage(Token, Parent, Title);
    
  oint notion CreatePage --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --title "Created by 1C"

{
 "object": "page",
 "id": "11382aa7-fc4e-819a-80d4-feb525be9b58",
 "created_time": "2024-10-02T14:42:00Z",
 "last_edited_time": "2024-10-02T14:42: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": "page_id",
  "page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77"
 },
 "archived": false,
 "in_trash": false,
 "properties": {
  "title": {
   "id": "title",
   "type": "title",
   "title": [
    {
     "type": "text",
     "text": {
      "content": "title",
      "link": null
     },
     "annotations": {
      "bold": false,
      "italic": false,
      "strikethrough": false,
      "underline": false,
      "code": false,
      "color": "default"
     },
     "plain_text": "title",
     "href": null
    }
   ]
  }
 },
 "url": "https://www.notion.so/title-11382aa7fc4e819a80d4feb525be9b58",
 "public_url": null,
 "request_id": "4037636c-e715-43c0-9e7d-765d523fb925"
}