Skip to main content

notion.notion.retrievepage

Home > @runlightyear/notion > Notion > retrievePage

Notion.retrievePage() method

Retrieve a page

Signature:
retrievePage(props: RetrievePageProps): Promise<RetrievePageResponse>;

Parameters

ParameterTypeDescription
propsRetrievePageProps
Returns:

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);
},
});