Usage #
// Import the typed helper
import { archivePage } from "@hotglue/sdk/notion";
const result = await client.execute({
...archivePage({
page_id: string,
archived: bool,
}),
userId: "user_123",
});
// result is typed as ArchivePageOutput
const result = await client.execute({
integration: "notion",
tool: "archive_page",
userId: "user_123",
input: {
page_id: string,
archived: bool,
},
});
// 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 Archive Page tool");
Required Permissions #
update_content
Input Schema #
page_id
string
required
The ID of the page to archive
archived
bool
Set to true to archive, false to restore
default:
true
This tool calls: #
PATCH
https://api.notion.com/v1/pages/{page_id}