Create Notion page integration
Input
pageUrl requiredURL of the Notion page to scope and connect the integration to (the page id is extracted from it).
integrationName requiredDisplay name for the new internal integration.
workspace optionalWorkspace name the integration must be created under. Notion no longer offers an in-dialog workspace picker, so this must match the workspace currently active in the browser's sidebar - the script validates this upfront and throws if they differ. Default: the currently active workspace.
capabilities optionalIntegration capabilities. Default ['read'].
Default: ["read"]Output
token requiredpageId requiredconnected requiredWhether the integration was confirmed among the page's active connections on a fresh read after being added. Always true on a successful run: the script throws rather than returning if it cannot see the connection, because the integration and its token are created before this step and a silent failure would leave a live credential connected to nothing.
workspace requiredintegrationId requiredintegrationName required