diff --git a/connectors/src/connectors/notion/lib/notion_api.ts b/connectors/src/connectors/notion/lib/notion_api.ts index 5bcef7108aee..1b42a9a8f04b 100644 --- a/connectors/src/connectors/notion/lib/notion_api.ts +++ b/connectors/src/connectors/notion/lib/notion_api.ts @@ -938,7 +938,7 @@ export function parsePageBlock(block: BlockObjectResponse): ParsedNotionBlock { const fileUrl = "external" in fileContainer ? fileContainer.external.url - : fileContainer.file.url; + : fileContainer.file?.url || "NO_URL"; const caption = parseRichText(fileContainer.caption); const fileText = caption && caption.length