From 31da7a7bd87dfdeafe06b7c537a3ccdfe6c57177 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Sun, 29 Aug 2021 05:58:49 -0400 Subject: [PATCH] :zap: Handle rich_text when simplifying data on Notion Node (#2128) --- packages/nodes-base/nodes/Notion/GenericFunctions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nodes-base/nodes/Notion/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/GenericFunctions.ts index e6e4848967..77f60e6590 100644 --- a/packages/nodes-base/nodes/Notion/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/GenericFunctions.ts @@ -376,6 +376,9 @@ export function simplifyProperties(properties: any) { if (['text'].includes(properties[key].type)) { const texts = properties[key].text.map((e: { plain_text: string }) => e.plain_text || {}).join(''); results[`${key}`] = texts; + } else if (['rich_text'].includes(properties[key].type)) { + const texts = properties[key].rich_text.map((e: { plain_text: string }) => e.plain_text || {}).join(''); + results[`${key}`] = texts; } else if (['url', 'created_time', 'checkbox', 'number', 'last_edited_time', 'email', 'phone_number', 'date'].includes(properties[key].type)) { // tslint:disable-next-line: no-any results[`${key}`] = properties[key][type] as any;