diff --git a/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts index e1829b0942..68270ce05a 100644 --- a/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts @@ -926,7 +926,7 @@ export function getPageId(this: IExecuteFunctions, i: number) { pageId = page.value; } else if (page.value.includes('p=')) { // e.g https://www.notion.so/xxxxx?v=xxxxx&p=xxxxx&pm=s - pageId = new URLSearchParams(page.value).get('p') + pageId = new URLSearchParams(page.value).get('p') || ''; } else { // e.g https://www.notion.so/page_name-xxxxx pageId = page.value.match(databasePageUrlValidationRegexp)?.[1] || '';