Export a Notion page to PDF, HTML or Markdown
Input
url requiredThe Notion page URL, as copied from the browser or from Copy link (for example https://www.notion.so/My-Page-2b6da534361881e580d5f4cf4a8c36bd).
format optionalExport format. markdown and html produce a zip archive; pdf produces a PDF file. Including subpages in a PDF requires a Business plan; on other plans that toggle is locked and a pdf export covers the page alone.
Default: "markdown"include_subpages optionalInclude the page's subpages in the export. When false only the page itself is exported. Requesting true for a pdf export on a plan that locks the setting fails with a clear error rather than silently exporting one page.
Default: falseOutput
url requiredA link to the file's bytes on a managed browser. Null on the user's Chrome.
path requiredAbsolute path of the saved file on the machine running the browser. Null on a managed browser.
format requiredThe format the export was requested in.
filename requiredThe saved file's name: a zip for markdown and html exports, a PDF named after the page for pdf exports. It can end in (2) when a file of that name was already there.
page_url requiredThe page URL the export ran against, after any redirect.
page_title requiredTitle of the exported page.
include_subpages requiredWhether subpages were actually included, read back from the dialog rather than assumed from the argument. False when the workspace's plan locks the setting.
subpages_control requiredset when the script chose the subpage setting; locked_by_plan when Notion disabled the toggle for this format on this workspace's plan, in which case subpages are not included.
