Usage #
// Import the typed helper
import { appendBlockChildren } from "@hotglue/sdk/notion";
const result = await client.execute({
...appendBlockChildren({
block_id: string,
children: array,
after: string,
}),
userId: "user_123",
});
// result is typed as AppendBlockChildrenOutput
const result = await client.execute({
integration: "notion",
tool: "append_block_children",
userId: "user_123",
input: {
block_id: string,
children: array,
after: string,
},
});
// 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 Append Block Children tool");
Required Permissions #
insert_content
Input Schema #
block_id
string
required
The ID of the page or block to append content to
children
object[]
required
Array of block objects to append (max 100)
after
string
Block ID to insert new blocks after. If not provided, blocks are appended at the end.
This tool calls: #
PATCH
https://api.notion.com/v1/blocks/{block_id}/children