Create Page

Creates a new page in a data source or under a parent page

Usage #

// Import the typed helper
import { createPage } from "@hotglue/sdk/notion";
const result = await client.execute({
...createPage({
parent: object,
properties: object,
children: array,
// ...
}),
userId: "user_123",
});
// result is typed as CreatePageOutput
const result = await client.execute({
integration: "notion",
tool: "create_page",
userId: "user_123",
input: {
parent: object,
properties: object,
children: array,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["notion"],
userId: "user_123",
}),
});
await agent.generate("run the Create Page tool");

Required Permissions #

insert_content

Input Schema #

parent object required

Parent data source or page

properties object required

Page properties. For database pages, keys must match database schema. For page children, only title is valid.

children object[]

Content blocks to add to the page

icon object

Page icon (emoji or external URL)

cover object

Page cover image

Output Schema #

id string required
object string required
created_time string required
url string

This tool calls: #

POST https://api.notion.com/v1/pages