notion.notion.retrievepage
Home > @runlightyear/notion > Notion > retrievePage
Notion.retrievePage() method
Retrieve a page
Signature:retrievePage(props: RetrievePageProps): Promise<RetrievePageResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
props | RetrievePageProps |
Promise<RetrievePageResponse>
Example
Retrieve a page
import { defineAction } from "@runlightyear/lightyear";
import { Notion } from "@runlightyear/notion";
defineAction({
name: "retrievePage",
title: "Retrieve Page",
apps: ["notion"],
variables: ["pageId"],
run: async ({ auths, variables }) => {
const notion = new Notion({ auth: auths.notion });
const response = await notion.retrievePage({
pageId: variables.pageId!,
});
console.log("Page:", response.data);
},
});